Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Aug 13, 2021
1 parent b6f3d98 commit d4ad1c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/parallel/test-repl-preprocess-top-level-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const testCases = [
[ 'await 0; class Foo {}',
'let Foo; (async () => {this.Foo = Foo; await 0; class Foo {} })()' ],
[ 'if (await true) { function foo() {} }',
'var foo; (async () => {this.foo = foo; if (await true) { function foo() {} } })()' ],
'var foo; (async () => {this.foo = foo; ' +
'if (await true) { function foo() {} } })()' ],
[ 'if (await true) { class Foo{} }',
'(async () => { if (await true) { class Foo{} } })()' ],
[ 'if (await true) { var a = 1; }',
Expand Down Expand Up @@ -117,7 +118,8 @@ const testCases = [
[ 'for (const i in {x:1}) { await 1 }',
'(async () => { for (const i in {x:1}) { await 1 } })()'],
[ 'var x = await foo(); async function foo() { return Promise.resolve(1);}',
'var x; var foo; (async () => {this.foo = foo; void (x = await foo()); async function foo() { return Promise.resolve(1);} })()'],
'var x; var foo; (async () => {this.foo = foo; void (x = await foo()); ' +
'async function foo() { return Promise.resolve(1);} })()'],
];

for (const [input, expected] of testCases) {
Expand Down

0 comments on commit d4ad1c9

Please sign in to comment.