Skip to content

Commit d226f22

Browse files
committed
more tests
1 parent 4547548 commit d226f22

4 files changed

Lines changed: 8 additions & 216 deletions

File tree

  • dev-packages/node-integration-tests

dev-packages/node-integration-tests/suites/contextLines/filename-with-spaces/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('ContextLines integration in ESM', () => {
1818
stacktrace: {
1919
frames: expect.arrayContaining([
2020
{
21-
filename: expect.stringMatching(/\/scenario with space.mjs$/),
21+
filename: 'app:///suites/contextLines/filename-with-spaces/scenario with space.mjs',
2222
context_line: "Sentry.captureException(new Error('Test Error'));",
2323
pre_context: ["import * as Sentry from '@sentry/node';", ''],
2424
post_context: ['', '// some more post context'],
@@ -54,7 +54,7 @@ describe('ContextLines integration in CJS', () => {
5454
stacktrace: {
5555
frames: expect.arrayContaining([
5656
{
57-
filename: expect.stringMatching(/\/scenario with space.cjs$/),
57+
filename: 'app:///suites/contextLines/filename-with-spaces/scenario with space.cjs',
5858
context_line: "Sentry.captureException(new Error('Test Error'));",
5959
pre_context: [
6060
'',

dev-packages/node-integration-tests/suites/public-api/captureException/catched-error/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ test('should work inside catch block', async () => {
2121
stacktrace: {
2222
frames: expect.arrayContaining([
2323
expect.objectContaining({
24+
filename: 'app:///suites/public-api/captureException/catched-error/scenario.ts',
2425
context_line: " throw new Error('catched_error');",
2526
pre_context: [
2627
'Sentry.init({',

dev-packages/node-integration-tests/suites/public-api/captureException/simple-error/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ test('should capture a simple error with message', async () => {
1919
handled: true,
2020
},
2121
stacktrace: {
22-
frames: expect.any(Array),
22+
frames: expect.arrayContaining([
23+
expect.objectContaining({
24+
filename: 'app:///suites/public-api/captureException/simple-error/scenario.ts',
25+
}),
26+
]),
2327
},
2428
},
2529
],

0 commit comments

Comments
 (0)