-
-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathstack-test.js
More file actions
53 lines (40 loc) · 1.4 KB
/
Copy pathstack-test.js
File metadata and controls
53 lines (40 loc) · 1.4 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
42
43
44
45
46
47
48
49
50
51
52
53
'use strict';
const tape = require('tape');
const common = require('../common');
tape('v8 stack', (t) => {
t.timeoutAfter(45000);
const sess = common.Session.create('stack-scenario.js');
sess.waitBreak(() => {
sess.send('v8 bt');
});
sess.wait(/stack-scenario.js/, (err, line) => {
t.error(err);
t.ok(/method\(this=.*Class.*method args.*Number: 1\.23.*null/.test(line),
'Class method name and args');
// TODO(indutny): line numbers are off
t.ok(/stack-scenario.js:22:41/.test(line),
'Class method file pos');
});
sess.wait(/stack-scenario.js/, (err, line) => {
t.error(err);
t.ok(/third\(.*third args.*Smi: 1.*Object/.test(line),
'Third function name and args');
// TODO(indutny): line numbers are off
t.ok(/stack-scenario.js:13:15/.test(line), 'Third function file pos');
});
sess.wait(/stack-scenario.js/, (err, line) => {
t.error(err);
t.ok(/second\(.*second args.*Smi: 1/.test(line),
'Second function name and args');
// TODO(indutny): line numbers are off
t.ok(/stack-scenario.js:9:16/.test(line), 'Second function file pos');
});
sess.wait(/stack-scenario.js/, (err, line) => {
t.error(err);
t.ok(/first/.test(line), 'first function name');
// TODO(indutny): line numbers are off
t.ok(/stack-scenario.js:5:15/.test(line), 'first function file pos');
sess.quit();
t.end();
});
});