-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
38 lines (36 loc) · 1.09 KB
/
test.ts
File metadata and controls
38 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { afterAll, expect, test } from 'vitest';
import { cleanupChildProcesses, createRunner } from '../../../../utils/runner';
afterAll(() => {
cleanupChildProcesses();
});
test('should capture a simple error with message', async () => {
await createRunner(__dirname, 'scenario.ts')
.expect({
event: {
exception: {
values: [
{
type: 'Error',
value: 'test_simple_error',
mechanism: {
type: 'generic',
handled: true,
},
stacktrace: {
frames: expect.arrayContaining([
expect.objectContaining({
filename: '/suites/public-api/captureException/simple-error/scenario.ts',
abs_path: expect.stringContaining(
'/dev-packages/node-integration-tests/suites/public-api/captureException/simple-error/scenario.ts',
),
}),
]),
},
},
],
},
},
})
.start()
.completed();
});