Skip to content
Snippets Groups Projects
Commit 418f9387 authored by Tooru Fujisawa's avatar Tooru Fujisawa
Browse files

Bug 1797736 - Part 3: Add testcase for eager evaluation with...

Bug 1797736 - Part 3: Add testcase for eager evaluation with InitAliasedLexical with hops == 0. r=nchevobbe

Depends on D161018

Differential Revision: https://phabricator.services.mozilla.com/D161019
parent 600b589d
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,11 @@ add_task(async () => {
var originalExec = RegExp.prototype.exec;
var promptIterable = { [Symbol.iterator]() { return { next: prompt } } };
function aliasedTest() {
const aliased = "ALIASED";
return [0].map(() => aliased)[0];
}
</script>`);
const commands = await CommandsFactory.forTab(tab);
......@@ -251,6 +256,10 @@ async function doSimpleEagerEval(commands) {
code: `"abc".match(/a./)[0]`,
result: "ab",
},
{
code: "aliasedTest()",
result: "ALIASED",
},
];
for (const { code, result } of testData) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment