Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 1749b7c

Browse files
committed
test: update test to use engine-specific message
1 parent 3590539 commit 1749b7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-vm-run-in-new-context.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ fn();
8888
assert.strictEqual(lines[1].trim(), code);
8989
// Skip lines[2] and lines[3]. They're just a ^ and blank line.
9090
assert.strictEqual(lines[4].trim(), 'Error: foo');
91-
assert.strictEqual(lines[5].trim(), `at ${file}:1:7`);
91+
assert(common.engineSpecificMessage({
92+
v8: new RegExp(`^at ${file}:1:7$`),
93+
chakracore: new RegExp(`^at Global code \\(${file}:1:1\\)$`)
94+
}).test(lines[5].trim()));
9295
// The rest of the stack is uninteresting.
9396
return true;
9497
});

0 commit comments

Comments
 (0)