Skip to content

Commit 6acd25e

Browse files
committed
fix unit test
1 parent 7af3e01 commit 6acd25e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/integrations/test/extraerrordata.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ describe('ExtraErrorData()', () => {
215215
});
216216
});
217217

218-
it('captures Error causes when captureErrorCause = true', () => {
218+
it('captures Error causes when captureErrorCause = true (default)', () => {
219219
// Error.cause is only available from node 16 upwards
220220
const nodeMajorVersion = parseInt(process.versions.node.split('.')[0]);
221221
if (nodeMajorVersion < 16) {
222222
return;
223223
}
224224

225-
const extraErrorDataWithCauseCapture = extraErrorDataIntegration({ captureErrorCause: true });
225+
const extraErrorDataWithCauseCapture = extraErrorDataIntegration();
226226

227227
// @ts-expect-error The typing .d.ts library we have installed isn't aware of Error.cause yet
228228
const error = new Error('foo', { cause: { woot: 'foo' } }) as ExtendedError;
@@ -251,7 +251,7 @@ describe('ExtraErrorData()', () => {
251251
return;
252252
}
253253

254-
const extraErrorDataWithoutCauseCapture = extraErrorDataIntegration();
254+
const extraErrorDataWithoutCauseCapture = extraErrorDataIntegration({ captureErrorCause: false });
255255

256256
// @ts-expect-error The typing .d.ts library we have installed isn't aware of Error.cause yet
257257
const error = new Error('foo', { cause: { woot: 'foo' } }) as ExtendedError;

0 commit comments

Comments
 (0)