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
This commit is contained in:
Tooru Fujisawa 2022-12-13 09:41:47 +00:00
Родитель 600b589deb
Коммит 418f9387ad
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -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) {