We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36e7a9c commit 66f28a0Copy full SHA for 66f28a0
packages/integrations/test/extraerrordata.test.ts
@@ -133,4 +133,25 @@ describe('ExtraErrorData()', () => {
133
},
134
});
135
136
+
137
+ it('toJSON props should allow for usage of native names', () => {
138
+ const error = new TypeError('foo') as ExtendedError;
139
+ error.baz = 42;
140
+ error.toJSON = function() {
141
+ return {
142
+ message: 'bar',
143
+ };
144
145
146
+ const enhancedEvent = extraErrorData.enhanceEventWithErrorData(event, {
147
+ originalException: error,
148
+ });
149
150
+ expect(enhancedEvent.contexts).toEqual({
151
+ TypeError: {
152
+ baz: 42,
153
154
+ },
155
156
157
0 commit comments