-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Expand file tree
/
Copy pathtest-debugger-probe-timeout.js
More file actions
41 lines (38 loc) · 1.02 KB
/
test-debugger-probe-timeout.js
File metadata and controls
41 lines (38 loc) · 1.02 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
39
40
41
// This tests probe session timeout behavior and teardown.
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const fixtures = require('../common/fixtures');
const { spawnSyncAndExit } = require('../common/child_process');
const { assertProbeJson } = require('../common/debugger-probe');
const cwd = fixtures.path('debugger');
const timeout = common.platformTimeout(1000);
spawnSyncAndExit(process.execPath, [
'inspect',
'--json',
`--timeout=${timeout}`,
'--probe', 'probe-timeout.js:99',
'--expr', '1',
'probe-timeout.js',
], { cwd }, {
signal: null,
status: 1,
stdout(output) {
assertProbeJson(output, {
v: 2,
probes: [{
expr: '1',
target: { suffix: 'probe-timeout.js', line: 99 },
}],
results: [{
event: 'timeout',
pending: [0],
error: {
code: 'probe_timeout',
message: `Timed out after ${timeout}ms waiting for probes: probe-timeout.js:99`,
},
}],
});
},
trim: true,
});