Skip to content

Commit

Permalink
for await of
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 22, 2022
1 parent e733db7 commit 09e48a5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,29 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`await.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
async function a() {
for await((let).a of foo);
}
async function b() {
for await((let)[a] of foo);
}
=====================================output=====================================
async function a() {
for await ((let).a of foo);
}
async function b() {
for await ((let)[a] of foo);
}
================================================================================
`;

exports[`let.js format 1`] = `
====================================options=====================================
parsers: ["babel", "typescript"]
Expand Down
6 changes: 6 additions & 0 deletions tests/format/js/identifier/for-of/await.js
@@ -0,0 +1,6 @@
async function a() {
for await((let).a of foo);
}
async function b() {
for await((let)[a] of foo);
}

0 comments on commit 09e48a5

Please sign in to comment.