Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(javascript): do not apply test call formatting to arrow without body #5366

Merged
merged 6 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add tests
  • Loading branch information
ikatyang committed Nov 7, 2018
commit 9033045bb5a9998d1a4a1803226ce295b09f59ff
20 changes: 20 additions & 0 deletions tests/test_declarations/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,11 @@ it("does something quick", () => {
console.log("hello!")
}, 1000000000)

it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10))
);

it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10)),
Expand Down Expand Up @@ -842,6 +847,11 @@ it("does something quick", () => {
console.log("hello!");
}, 1000000000);

it(
"succeeds if the test finishes in time",
() => new Promise(resolve => setTimeout(resolve, 10))
);

it(
"succeeds if the test finishes in time",
() => new Promise(resolve => setTimeout(resolve, 10)),
Expand Down Expand Up @@ -971,6 +981,11 @@ it("does something quick", () => {
console.log("hello!")
}, 1000000000)

it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10))
);

it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10)),
Expand Down Expand Up @@ -1110,6 +1125,11 @@ it("does something quick", () => {
console.log("hello!");
}, 1000000000);

it(
"succeeds if the test finishes in time",
() => new Promise((resolve) => setTimeout(resolve, 10))
);

it(
"succeeds if the test finishes in time",
() => new Promise((resolve) => setTimeout(resolve, 10)),
Expand Down
5 changes: 5 additions & 0 deletions tests/test_declarations/test_declarations.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ it("does something quick", () => {
console.log("hello!")
}, 1000000000)

it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10))
);

it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10)),
Expand Down