blob: 7797f904a22631031f22af6956a3505d3bf5cb82 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
try {
(function () {
throw new Error("ok");
}());
} catch (error) {
for (let line of error.stack.split('\n'))
shouldBe(line.includes('@'), true);
}
try {
eval(`
throw new Error("ok");
`);
} catch (error) {
for (let line of error.stack.split('\n'))
shouldBe(line.includes('@'), true);
}
try {
eval(`
(function () {
throw new Error("ok");
}());
`);
} catch (error) {
for (let line of error.stack.split('\n'))
shouldBe(line.includes('@'), true);
}