-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathtest.ts
29 lines (27 loc) · 844 Bytes
/
test.ts
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
import { cleanupChildProcesses, createRunner } from '../../../utils/runner';
describe('lru-memoizer', () => {
afterAll(() => {
cleanupChildProcesses();
});
test('keeps outer context inside the memoized inner functions', done => {
createRunner(__dirname, 'scenario.js')
// We expect only one transaction and nothing else.
// A failed test will result in an error event being sent to Sentry.
// Which will fail this suite.
.expect({
transaction: {
transaction: '<unknown>',
contexts: {
trace: expect.objectContaining({
op: 'run',
data: expect.objectContaining({
'sentry.op': 'run',
'sentry.origin': 'manual',
}),
}),
},
},
})
.start(done);
});
});