Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e59c34
commit 5d5eaea
Showing
3 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
tests/js/await-with-parens/__snapshots__/jsfmt.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`await-with-parens.js [espree] format 1`] = ` | ||
"Cannot use keyword 'await' outside an async function (1:25) | ||
> 1 | function foo(promise) { await (promise); } | ||
| ^ | ||
2 | | ||
3 | function a() { | ||
4 | return await (1)" | ||
`; | ||
exports[`await-with-parens.js [meriyah] format 1`] = ` | ||
"[1:29]: 'Await' may not be used as an identifier in this context (1:29) | ||
> 1 | function foo(promise) { await (promise); } | ||
| ^ | ||
2 | | ||
3 | function a() { | ||
4 | return await (1)" | ||
`; | ||
exports[`await-with-parens.js format 1`] = ` | ||
====================================options===================================== | ||
parsers: ["babel"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
function foo(promise) { await (promise); } | ||
function a() { | ||
return await (1) | ||
} | ||
() => { await (x) }; | ||
function foo() { | ||
await | ||
(foo); | ||
} | ||
export class C { | ||
p = await (0); | ||
} | ||
await (0); | ||
=====================================output===================================== | ||
function foo(promise) { | ||
await(promise); | ||
} | ||
function a() { | ||
return await(1); | ||
} | ||
() => { | ||
await(x); | ||
}; | ||
function foo() { | ||
await(foo); | ||
} | ||
export class C { | ||
p = await 0; | ||
} | ||
await 0; | ||
================================================================================ | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function foo(promise) { await (promise); } | ||
|
||
function a() { | ||
return await (1) | ||
} | ||
|
||
() => { await (x) }; | ||
|
||
function foo() { | ||
await | ||
(foo); | ||
} | ||
|
||
export class C { | ||
p = await (0); | ||
} | ||
|
||
await (0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
run_spec(__dirname, ["babel"], { | ||
errors: { | ||
espree: true, | ||
meriyah: true, | ||
}, | ||
}); |