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

test Flow with babel-flow parser #9303

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions tests/flow-repo/abnormal/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`break-continue.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -32,7 +32,7 @@ function bar() {

exports[`return.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -56,7 +56,7 @@ function foo() {

exports[`toplevel_throw.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/abnormal/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
14 changes: 7 additions & 7 deletions tests/flow-repo/annot/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`annot.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -149,7 +149,7 @@ function barfoo(n: number | null | void): ?number {

exports[`forward_ref.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -191,7 +191,7 @@ function foo() {

exports[`issue-530.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -209,7 +209,7 @@ module.exports = foo;

exports[`leak.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -265,7 +265,7 @@ function bar(y: MyObj): string {

exports[`other.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -281,7 +281,7 @@ module.exports = (C: any);

exports[`scope.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -345,7 +345,7 @@ class Foo<A> {

exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/annot/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
6 changes: 3 additions & 3 deletions tests/flow-repo/annot2/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`A.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -42,7 +42,7 @@ export default class {

exports[`B.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -72,7 +72,7 @@ class B extends A {

exports[`T.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/annot2/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
14 changes: 7 additions & 7 deletions tests/flow-repo/any/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`any.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -38,7 +38,7 @@ var z: string = qux(0);

exports[`anyexportflowfile.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -56,7 +56,7 @@ module.exports = ((x: any) => x: any);

exports[`flowfixme.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -114,7 +114,7 @@ var w: string = baz(0);

exports[`flowissue.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -172,7 +172,7 @@ var w: string = baz(0);

exports[`nonflowfile.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -190,7 +190,7 @@ module.exports = (x) => x;

exports[`propagate.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -252,7 +252,7 @@ function bar2(x: mixed) {

exports[`reach.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/any/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
10 changes: 5 additions & 5 deletions tests/flow-repo/arith/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Arith.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -195,7 +195,7 @@ let tests = [

exports[`exponent.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -229,7 +229,7 @@ y **= 2; // error

exports[`generic.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -265,7 +265,7 @@ function f<A, B>(a: A, b: B): B {

exports[`mult.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -301,7 +301,7 @@ y *= 2; // error

exports[`relational.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/arith/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
4 changes: 2 additions & 2 deletions tests/flow-repo/array-filter/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -32,7 +32,7 @@ function filterOutSmall(arr: Array<?number>): Array<?number> {

exports[`test2.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/array-filter/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`test.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/array_spread/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
2 changes: 1 addition & 1 deletion tests/flow-repo/arraylib/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`array_lib.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/arraylib/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
4 changes: 2 additions & 2 deletions tests/flow-repo/arrays/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Arrays.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -91,7 +91,7 @@ module.exports = "arrays";

exports[`numeric_elem.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/arrays/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
4 changes: 2 additions & 2 deletions tests/flow-repo/arrows/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`advanced_arrows.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -36,7 +36,7 @@ var ident = <T>(x: T): T => x;

exports[`arrows.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down
2 changes: 1 addition & 1 deletion tests/flow-repo/arrows/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["flow"]);
run_spec(__dirname, ["flow", "babel-flow"]);
16 changes: 8 additions & 8 deletions tests/flow-repo/async/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`async.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -126,7 +126,7 @@ var objf: () => Promise<number> = obj.f;

exports[`async_base_class.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -166,7 +166,7 @@ async function foo() {

exports[`async_parse.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -226,7 +226,7 @@ var y = { async };

exports[`async_promise.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -244,7 +244,7 @@ async function f(): Promise<number> {

exports[`async_return_void.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -284,7 +284,7 @@ async function foo3(): Promise<string> {

exports[`async2.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -418,7 +418,7 @@ function test5() {

exports[`async3.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -493,7 +493,7 @@ async function baz() {

exports[`await_parse.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["flow", "babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down