diff --git a/tests/array_spread/__snapshots__/jsfmt.spec.js.snap b/tests/array_spread/__snapshots__/jsfmt.spec.js.snap index 3ec2ed4d2..4fede5c75 100644 --- a/tests/array_spread/__snapshots__/jsfmt.spec.js.snap +++ b/tests/array_spread/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`multiple.js 1`] = ` +exports[`multiple.js-flow 1`] = ` "[...a, ...b,]; [...a, ...b]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ exports[`multiple.js 1`] = ` " `; -exports[`multiple.js 2`] = ` +exports[`multiple.js-typescript 1`] = ` "[...a, ...b,]; [...a, ...b]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/arrays/__snapshots__/jsfmt.spec.js.snap index 5c9618de2..b67af45e3 100644 --- a/tests/arrays/__snapshots__/jsfmt.spec.js.snap +++ b/tests/arrays/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`last.js 1`] = ` +exports[`last.js-flow 1`] = ` "[,]; [,,]; [,,1,]; @@ -13,7 +13,7 @@ exports[`last.js 1`] = ` " `; -exports[`last.js 2`] = ` +exports[`last.js-typescript 1`] = ` "[,]; [,,]; [,,1,]; @@ -26,7 +26,7 @@ exports[`last.js 2`] = ` " `; -exports[`preserve_empty_lines.js 1`] = ` +exports[`preserve_empty_lines.js-flow 1`] = ` "a = [ 1, @@ -44,7 +44,7 @@ a = [1, 2, 3, 4]; " `; -exports[`preserve_empty_lines.js 2`] = ` +exports[`preserve_empty_lines.js-typescript 1`] = ` "a = [ 1, diff --git a/tests/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/arrows/__snapshots__/jsfmt.spec.js.snap index 985596674..88e63cb88 100644 --- a/tests/arrows/__snapshots__/jsfmt.spec.js.snap +++ b/tests/arrows/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`arrow_function_expression.js 1`] = ` +exports[`arrow_function_expression.js-babylon 1`] = ` "(a => {}).length typeof (() => {}); export default (() => {})(); @@ -66,14 +66,14 @@ a = (b?) => c; " `; -exports[`block_like.js 1`] = ` +exports[`block_like.js-babylon 1`] = ` "a = () => ({} = this); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a = () => ({} = this); " `; -exports[`call.js 1`] = ` +exports[`call.js-babylon 1`] = ` "Seq(typeDef.interface.groups).forEach(group => Seq(group.members).forEach((member, memberName) => markdownDoc( @@ -231,7 +231,7 @@ jest.mock( " `; -exports[`long-call-no-args.js 1`] = ` +exports[`long-call-no-args.js-babylon 1`] = ` "veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ veryLongCall( @@ -241,7 +241,7 @@ veryLongCall( " `; -exports[`long-contents.js 1`] = ` +exports[`long-contents.js-babylon 1`] = ` "const foo = () => { expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'}); }; @@ -257,7 +257,7 @@ const foo = () => { " `; -exports[`short_body.js 1`] = ` +exports[`short_body.js-babylon 1`] = ` "const initializeSnapshotState = ( testFile: Path, update: boolean, diff --git a/tests/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/assignment/__snapshots__/jsfmt.spec.js.snap index 69f93fe46..8fbef84c4 100644 --- a/tests/assignment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/assignment/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`binaryish.js 1`] = ` +exports[`binaryish.js-flow 1`] = ` "const computedDescriptionLines = (showConfirm && descriptionLinesConfirming) || (focused && !loading && descriptionLinesFocused) || diff --git a/tests/assignment_comments/__snapshots__/jsfmt.spec.js.snap b/tests/assignment_comments/__snapshots__/jsfmt.spec.js.snap index 46a2055e0..c73708571 100644 --- a/tests/assignment_comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/assignment_comments/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`assignment_comments.js 1`] = ` +exports[`assignment_comments.js-flow 1`] = ` "fnString = // Comment 'some' + 'long' + 'string'; @@ -120,7 +120,7 @@ let f = ( " `; -exports[`assignment_comments.js 2`] = ` +exports[`assignment_comments.js-typescript 1`] = ` "fnString = // Comment 'some' + 'long' + 'string'; diff --git a/tests/assignment_expression/__snapshots__/jsfmt.spec.js.snap b/tests/assignment_expression/__snapshots__/jsfmt.spec.js.snap index cc53cafe3..2e9ea3945 100644 --- a/tests/assignment_expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/assignment_expression/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`assignment_expression.js 1`] = ` +exports[`assignment_expression.js-flow 1`] = ` "this.size = this._origin = this._capacity = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ this.size = this._origin = this._capacity = 0; diff --git a/tests/async/__snapshots__/jsfmt.spec.js.snap b/tests/async/__snapshots__/jsfmt.spec.js.snap index 01749e485..eebbd2cdb 100644 --- a/tests/async/__snapshots__/jsfmt.spec.js.snap +++ b/tests/async/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`await_parse.js 1`] = ` +exports[`await_parse.js-flow 1`] = ` "async function f() { (await f()).length } async function g() { invariant( @@ -29,7 +29,7 @@ async function f() { " `; -exports[`await_parse.js 2`] = ` +exports[`await_parse.js-typescript 1`] = ` "async function f() { (await f()).length } async function g() { invariant( @@ -58,7 +58,7 @@ async function f() { " `; -exports[`conditional-expression.js 1`] = ` +exports[`conditional-expression.js-flow 1`] = ` "async function f() { const result = typeof fn === 'function' ? await fn() : null; } @@ -79,7 +79,7 @@ async function f() { " `; -exports[`conditional-expression.js 2`] = ` +exports[`conditional-expression.js-typescript 1`] = ` "async function f() { const result = typeof fn === 'function' ? await fn() : null; } diff --git a/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap index 09286db6f..f4e068b1a 100644 --- a/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/binary-expressions/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`arrow.js 1`] = ` +exports[`arrow.js-flow 1`] = ` "function f() { const appEntitys = getAppEntitys(loadObject).filter( entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() @@ -19,7 +19,7 @@ function f() { " `; -exports[`comment.js 1`] = ` +exports[`comment.js-flow 1`] = ` "a = ( // Commment 1 (Math.random() * (yRange * (1 - minVerticalFraction))) @@ -34,7 +34,7 @@ a = " `; -exports[`exp.js 1`] = ` +exports[`exp.js-flow 1`] = ` "a ** b ** c; (a ** b) ** c; a.b ** c; @@ -55,7 +55,7 @@ a ** (b * c); " `; -exports[`inline-object-array.js 1`] = ` +exports[`inline-object-array.js-flow 1`] = ` "prevState = prevState || { catalogs: [], loadState: LOADED, @@ -88,7 +88,7 @@ this.steps = steps || [ " `; -exports[`short-right.js 1`] = ` +exports[`short-right.js-flow 1`] = ` "this._cumulativeHeights && Math.abs( this._cachedItemHeight(this._firstVisibleIndex + i) - @@ -128,7 +128,7 @@ defaultContent.filter(defaultLocale => { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// It should always break the highest precedence operators first, and // break them all at the same time. diff --git a/tests/bracketSpacing/__snapshots__/jsfmt.spec.js.snap b/tests/bracketSpacing/__snapshots__/jsfmt.spec.js.snap index a5546b251..36928c6c2 100644 --- a/tests/bracketSpacing/__snapshots__/jsfmt.spec.js.snap +++ b/tests/bracketSpacing/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array.js 1`] = ` +exports[`array.js-flow 1`] = ` "const arr1 = [1,2,3,4]; const arr2 = [1, 2, 3, 4]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ const arr2 = [1, 2, 3, 4]; " `; -exports[`array.js 2`] = ` +exports[`array.js-flow 2`] = ` "const arr1 = [1,2,3,4]; const arr2 = [1, 2, 3, 4]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -18,7 +18,7 @@ const arr2 = [1, 2, 3, 4]; " `; -exports[`array.js 3`] = ` +exports[`array.js-typescript 1`] = ` "const arr1 = [1,2,3,4]; const arr2 = [1, 2, 3, 4]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -27,7 +27,7 @@ const arr2 = [1, 2, 3, 4]; " `; -exports[`array.js 4`] = ` +exports[`array.js-typescript 2`] = ` "const arr1 = [1,2,3,4]; const arr2 = [1, 2, 3, 4]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -36,7 +36,7 @@ const arr2 = [1, 2, 3, 4]; " `; -exports[`object.js 1`] = ` +exports[`object.js-flow 1`] = ` "const obj1 = {a:1, b:2, c:3} const obj2 = { a:1, b:2, c:3 }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -45,7 +45,7 @@ const obj2 = { a: 1, b: 2, c: 3 }; " `; -exports[`object.js 2`] = ` +exports[`object.js-flow 2`] = ` "const obj1 = {a:1, b:2, c:3} const obj2 = { a:1, b:2, c:3 }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -54,7 +54,7 @@ const obj2 = {a: 1, b: 2, c: 3}; " `; -exports[`object.js 3`] = ` +exports[`object.js-typescript 1`] = ` "const obj1 = {a:1, b:2, c:3} const obj2 = { a:1, b:2, c:3 }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -63,7 +63,7 @@ const obj2 = { a: 1, b: 2, c: 3 }; " `; -exports[`object.js 4`] = ` +exports[`object.js-typescript 2`] = ` "const obj1 = {a:1, b:2, c:3} const obj2 = { a:1, b:2, c:3 }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/break-calls/__snapshots__/jsfmt.spec.js.snap b/tests/break-calls/__snapshots__/jsfmt.spec.js.snap index 1782e5aa5..d8aa00059 100644 --- a/tests/break-calls/__snapshots__/jsfmt.spec.js.snap +++ b/tests/break-calls/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`break.js 1`] = ` +exports[`break.js-flow 1`] = ` "h(f(g(() => { a }))) @@ -80,7 +80,7 @@ expect( " `; -exports[`break.js 2`] = ` +exports[`break.js-typescript 1`] = ` "h(f(g(() => { a }))) @@ -160,7 +160,7 @@ expect( " `; -exports[`parent.js 1`] = ` +exports[`parent.js-flow 1`] = ` "runtimeAgent.getProperties( objectId, false, // ownProperties @@ -183,7 +183,7 @@ runtimeAgent.getProperties( " `; -exports[`parent.js 2`] = ` +exports[`parent.js-typescript 1`] = ` "runtimeAgent.getProperties( objectId, false, // ownProperties diff --git a/tests/class_comment/__snapshots__/jsfmt.spec.js.snap b/tests/class_comment/__snapshots__/jsfmt.spec.js.snap index 1ba9b5e19..ab7a076df 100644 --- a/tests/class_comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/class_comment/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comments.js 1`] = ` +exports[`comments.js-flow 1`] = ` "class A // comment 1 // comment 2 extends B {} @@ -57,7 +57,7 @@ class A extends /* a */ B {} " `; -exports[`comments.js 2`] = ` +exports[`comments.js-typescript 1`] = ` "class A // comment 1 // comment 2 extends B {} diff --git a/tests/class_extends/__snapshots__/jsfmt.spec.js.snap b/tests/class_extends/__snapshots__/jsfmt.spec.js.snap index 5713ceea5..f25e9e67b 100644 --- a/tests/class_extends/__snapshots__/jsfmt.spec.js.snap +++ b/tests/class_extends/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`extends.js 1`] = ` +exports[`extends.js-flow 1`] = ` "// \\"ArrowFunctionExpression\\" class a extends (() => {}) {} @@ -119,7 +119,7 @@ x = class extends (++b) {}; " `; -exports[`extends.js 2`] = ` +exports[`extends.js-typescript 1`] = ` "// \\"ArrowFunctionExpression\\" class a extends (() => {}) {} diff --git a/tests/classes/__snapshots__/jsfmt.spec.js.snap b/tests/classes/__snapshots__/jsfmt.spec.js.snap index f51a0b20a..b44b72f26 100644 --- a/tests/classes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/classes/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`binary.js 1`] = ` +exports[`binary.js-flow 1`] = ` "(class {}) + 1; (class a {}) + 1; (class extends b {}) + 1; @@ -13,7 +13,7 @@ exports[`binary.js 1`] = ` " `; -exports[`break.js 1`] = ` +exports[`break.js-flow 1`] = ` "class MyContractSelectionWidget extends React.Component implements SomethingLarge { method() {} } @@ -26,14 +26,14 @@ class MyContractSelectionWidget " `; -exports[`call.js 1`] = ` +exports[`call.js-flow 1`] = ` "(class {})(class {}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (class {}(class {})); " `; -exports[`empty.js 1`] = ` +exports[`empty.js-flow 1`] = ` "class A { // comment } @@ -64,7 +64,7 @@ class A { " `; -exports[`member.js 1`] = ` +exports[`member.js-flow 1`] = ` "(class {})[1]; (class {}).a; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -73,7 +73,7 @@ exports[`member.js 1`] = ` " `; -exports[`ternary.js 1`] = ` +exports[`ternary.js-flow 1`] = ` "if (1) (class {}) ? 1 : 2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (1) (class {} ? 1 : 2); diff --git a/tests/comments/__snapshots__/jsfmt.spec.js.snap b/tests/comments/__snapshots__/jsfmt.spec.js.snap index 675a0790f..cc356ebd2 100644 --- a/tests/comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/comments/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`assignment-pattern.js 1`] = ` +exports[`assignment-pattern.js-babylon 1`] = ` "const { a /* comment */ = 1 } = b; const { c = 1 /* comment */ } = d; @@ -18,7 +18,7 @@ let { " `; -exports[`assignment-pattern.js 2`] = ` +exports[`assignment-pattern.js-flow 1`] = ` "const { a /* comment */ = 1 } = b; const { c = 1 /* comment */ } = d; @@ -36,7 +36,7 @@ let { " `; -exports[`blank.js 1`] = ` +exports[`blank.js-babylon 1`] = ` "// This file only // has comments. This comment // should still exist @@ -83,7 +83,7 @@ exports[`blank.js 1`] = ` " `; -exports[`blank.js 2`] = ` +exports[`blank.js-flow 1`] = ` "// This file only // has comments. This comment // should still exist @@ -130,7 +130,7 @@ exports[`blank.js 2`] = ` " `; -exports[`call_comment.js 1`] = ` +exports[`call_comment.js-babylon 1`] = ` "render( // Warm any cache , container @@ -155,7 +155,7 @@ React.render( " `; -exports[`call_comment.js 2`] = ` +exports[`call_comment.js-flow 1`] = ` "render( // Warm any cache , container @@ -180,7 +180,7 @@ React.render( " `; -exports[`dangling.js 1`] = ` +exports[`dangling.js-babylon 1`] = ` "var x = {/* dangling */}; var x = { // dangling @@ -211,7 +211,7 @@ export /* dangling */{}; " `; -exports[`dangling.js 2`] = ` +exports[`dangling.js-flow 1`] = ` "var x = {/* dangling */}; var x = { // dangling @@ -242,7 +242,7 @@ export /* dangling */{}; " `; -exports[`dangling_array.js 1`] = ` +exports[`dangling_array.js-babylon 1`] = ` "expect(() => {}).toTriggerReadyStateChanges([ // Nothing. ]); @@ -259,7 +259,7 @@ expect(() => {}).toTriggerReadyStateChanges( " `; -exports[`dangling_array.js 2`] = ` +exports[`dangling_array.js-flow 1`] = ` "expect(() => {}).toTriggerReadyStateChanges([ // Nothing. ]); @@ -276,7 +276,7 @@ expect(() => {}).toTriggerReadyStateChanges( " `; -exports[`dangling_for.js 1`] = ` +exports[`dangling_for.js-babylon 1`] = ` "for // comment (;;); @@ -290,7 +290,7 @@ for (;;); " `; -exports[`dangling_for.js 2`] = ` +exports[`dangling_for.js-flow 1`] = ` "for // comment (;;); @@ -304,7 +304,7 @@ for (;;); " `; -exports[`export.js 1`] = ` +exports[`export.js-babylon 1`] = ` "export //comment {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -313,7 +313,7 @@ export {}; " `; -exports[`export.js 2`] = ` +exports[`export.js-flow 1`] = ` "export //comment {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -322,7 +322,7 @@ export {}; " `; -exports[`first-line.js 1`] = ` +exports[`first-line.js-babylon 1`] = ` "a // comment b ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -331,7 +331,7 @@ b; " `; -exports[`first-line.js 2`] = ` +exports[`first-line.js-flow 1`] = ` "a // comment b ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -340,7 +340,7 @@ b; " `; -exports[`flow_union.js 1`] = ` +exports[`flow_union.js-babylon 1`] = ` "type UploadState // The upload hasnt begun yet = {type: \\"Not_begun\\"} @@ -383,7 +383,7 @@ type UploadState = " `; -exports[`flow_union.js 2`] = ` +exports[`flow_union.js-flow 1`] = ` "type UploadState // The upload hasnt begun yet = {type: \\"Not_begun\\"} @@ -426,7 +426,7 @@ type UploadState = " `; -exports[`function-declaration.js 1`] = ` +exports[`function-declaration.js-babylon 1`] = ` "function a(/* comment */) {} // comment function b() {} // comment function c(/* comment */ argA, argB, argC) {} // comment @@ -437,7 +437,7 @@ function c(/* comment */ argA, argB, argC) {} // comment " `; -exports[`function-declaration.js 2`] = ` +exports[`function-declaration.js-flow 1`] = ` "function a(/* comment */) {} // comment function b() {} // comment function c(/* comment */ argA, argB, argC) {} // comment @@ -448,7 +448,7 @@ function c(/* comment */ argA, argB, argC) {} // comment " `; -exports[`if.js 1`] = ` +exports[`if.js-babylon 1`] = ` "if (1) // comment { @@ -492,7 +492,7 @@ else if (4) { " `; -exports[`if.js 2`] = ` +exports[`if.js-flow 1`] = ` "if (1) // comment { @@ -536,7 +536,7 @@ else if (4) { " `; -exports[`issues.js 1`] = ` +exports[`issues.js-babylon 1`] = ` "// Does not need to break as it fits in 80 columns this.call(a, /* comment */ b); @@ -762,7 +762,7 @@ foo( " `; -exports[`issues.js 2`] = ` +exports[`issues.js-flow 1`] = ` "// Does not need to break as it fits in 80 columns this.call(a, /* comment */ b); @@ -988,7 +988,7 @@ foo( " `; -exports[`jsx.js 1`] = ` +exports[`jsx.js-babylon 1`] = ` "
{ /* comment */ @@ -1126,7 +1126,7 @@ exports[`jsx.js 1`] = ` " `; -exports[`jsx.js 2`] = ` +exports[`jsx.js-flow 1`] = ` "
{ /* comment */ @@ -1264,7 +1264,7 @@ exports[`jsx.js 2`] = ` " `; -exports[`last-arg.js 1`] = ` +exports[`last-arg.js-babylon 1`] = ` "type f = ( currentRequest: {a: number}, // TODO this is a very very very very long comment that makes it go > 80 columns @@ -1321,7 +1321,7 @@ class X { " `; -exports[`last-arg.js 2`] = ` +exports[`last-arg.js-flow 1`] = ` "type f = ( currentRequest: {a: number}, // TODO this is a very very very very long comment that makes it go > 80 columns @@ -1378,7 +1378,7 @@ class X { " `; -exports[`preserve-new-line-last.js 1`] = ` +exports[`preserve-new-line-last.js-babylon 1`] = ` "function f() { a /* eslint-disable */ @@ -1425,7 +1425,7 @@ function name() { " `; -exports[`preserve-new-line-last.js 2`] = ` +exports[`preserve-new-line-last.js-flow 1`] = ` "function f() { a /* eslint-disable */ @@ -1472,7 +1472,7 @@ function name() { " `; -exports[`return-statement.js 1`] = ` +exports[`return-statement.js-babylon 1`] = ` "function jsx() { return ( // Comment @@ -1712,7 +1712,7 @@ function inlineComment() { " `; -exports[`return-statement.js 2`] = ` +exports[`return-statement.js-flow 1`] = ` "function jsx() { return ( // Comment @@ -1952,7 +1952,7 @@ function inlineComment() { " `; -exports[`switch.js 1`] = ` +exports[`switch.js-babylon 1`] = ` "switch (node && node.type) { case \\"Property\\": case \\"MethodDefinition\\": @@ -1995,7 +1995,7 @@ switch (foo) { " `; -exports[`switch.js 2`] = ` +exports[`switch.js-flow 1`] = ` "switch (node && node.type) { case \\"Property\\": case \\"MethodDefinition\\": @@ -2038,7 +2038,7 @@ switch (foo) { " `; -exports[`template-literal.js 1`] = ` +exports[`template-literal.js-babylon 1`] = ` "\` \${a // comment } @@ -2067,7 +2067,7 @@ d}; " `; -exports[`template-literal.js 2`] = ` +exports[`template-literal.js-flow 1`] = ` "\` \${a // comment } @@ -2096,7 +2096,7 @@ d}; " `; -exports[`try.js 1`] = ` +exports[`try.js-babylon 1`] = ` "// comment 1 try { // comment 2 @@ -2124,7 +2124,7 @@ try { " `; -exports[`try.js 2`] = ` +exports[`try.js-flow 1`] = ` "// comment 1 try { // comment 2 diff --git a/tests/computed_props/__snapshots__/jsfmt.spec.js.snap b/tests/computed_props/__snapshots__/jsfmt.spec.js.snap index ee18c93da..8da03e8cf 100644 --- a/tests/computed_props/__snapshots__/jsfmt.spec.js.snap +++ b/tests/computed_props/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`classes.js 1`] = ` +exports[`classes.js-flow 1`] = ` "class c { [\\"i\\"]() {} } @@ -11,7 +11,7 @@ class c { " `; -exports[`classes.js 2`] = ` +exports[`classes.js-typescript 1`] = ` "class c { [\\"i\\"]() {} } diff --git a/tests/conditional/__snapshots__/jsfmt.spec.js.snap b/tests/conditional/__snapshots__/jsfmt.spec.js.snap index 4bebfd114..444cb946e 100644 --- a/tests/conditional/__snapshots__/jsfmt.spec.js.snap +++ b/tests/conditional/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comments.js 1`] = ` +exports[`comments.js-flow 1`] = ` "var inspect = 4 === util.inspect.length ? // node <= 0.8.x (function(v, colors) { @@ -79,7 +79,7 @@ const { configureStore } = process.env.NODE_ENV === \\"production\\" " `; -exports[`comments.js 2`] = ` +exports[`comments.js-typescript 1`] = ` "var inspect = 4 === util.inspect.length ? // node <= 0.8.x (function(v, colors) { @@ -158,7 +158,7 @@ const { configureStore } = process.env.NODE_ENV === \\"production\\" " `; -exports[`new-expression.js 1`] = ` +exports[`new-expression.js-flow 1`] = ` "const testConsole = new TestConsole( config.useStderr ? process.stderr : process.stdout ); @@ -169,7 +169,7 @@ const testConsole = new TestConsole( " `; -exports[`new-expression.js 2`] = ` +exports[`new-expression.js-typescript 1`] = ` "const testConsole = new TestConsole( config.useStderr ? process.stderr : process.stdout ); diff --git a/tests/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/decorators/__snapshots__/jsfmt.spec.js.snap index 861197341..ff2919863 100644 --- a/tests/decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/decorators/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`mobx.js 1`] = ` +exports[`mobx.js-babylon 1`] = ` "import {observable} from \\"mobx\\"; @observer class OrderLine { @@ -41,7 +41,7 @@ import { observable } from \\"mobx\\"; " `; -exports[`multiple.js 1`] = ` +exports[`multiple.js-babylon 1`] = ` "const dog = { @readonly @nonenumerable @@ -58,7 +58,7 @@ const dog = { " `; -exports[`redux.js 1`] = ` +exports[`redux.js-babylon 1`] = ` "@connect(mapStateToProps, mapDispatchToProps) export class MyApp extends React.Component {} diff --git a/tests/directives/__snapshots__/jsfmt.spec.js.snap b/tests/directives/__snapshots__/jsfmt.spec.js.snap index 3a93b3aa9..947224a34 100644 --- a/tests/directives/__snapshots__/jsfmt.spec.js.snap +++ b/tests/directives/__snapshots__/jsfmt.spec.js.snap @@ -1,45 +1,45 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`last-line-0.js 1`] = ` +exports[`last-line-0.js-babylon 1`] = ` "'use strict';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\"use strict\\"; " `; -exports[`last-line-0.js 2`] = ` +exports[`last-line-0.js-flow 1`] = ` "'use strict';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\"use strict\\"; " `; -exports[`last-line-0.js 3`] = ` +exports[`last-line-0.js-typescript 1`] = ` "'use strict';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\"use strict\\"; " `; -exports[`last-line-1.js 1`] = ` +exports[`last-line-1.js-babylon 1`] = ` "'use strict'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\"use strict\\"; " `; -exports[`last-line-1.js 2`] = ` +exports[`last-line-1.js-flow 1`] = ` "'use strict'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\"use strict\\"; " `; -exports[`last-line-1.js 3`] = ` +exports[`last-line-1.js-typescript 1`] = ` "'use strict'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \\"use strict\\"; " `; -exports[`last-line-2.js 1`] = ` +exports[`last-line-2.js-babylon 1`] = ` "'use strict'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -47,7 +47,7 @@ exports[`last-line-2.js 1`] = ` " `; -exports[`last-line-2.js 2`] = ` +exports[`last-line-2.js-flow 1`] = ` "'use strict'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -55,7 +55,7 @@ exports[`last-line-2.js 2`] = ` " `; -exports[`last-line-2.js 3`] = ` +exports[`last-line-2.js-typescript 1`] = ` "'use strict'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -63,7 +63,7 @@ exports[`last-line-2.js 3`] = ` " `; -exports[`newline.js 1`] = ` +exports[`newline.js-babylon 1`] = ` "/* @flow */ \\"use strict\\"; @@ -82,7 +82,7 @@ a(); " `; -exports[`newline.js 2`] = ` +exports[`newline.js-flow 1`] = ` "/* @flow */ \\"use strict\\"; @@ -101,7 +101,7 @@ a(); " `; -exports[`newline.js 3`] = ` +exports[`newline.js-typescript 1`] = ` "/* @flow */ \\"use strict\\"; @@ -120,7 +120,7 @@ a(); " `; -exports[`no-newline.js 1`] = ` +exports[`no-newline.js-babylon 1`] = ` "\\"use strict\\"; a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -129,7 +129,7 @@ a; " `; -exports[`no-newline.js 2`] = ` +exports[`no-newline.js-flow 1`] = ` "\\"use strict\\"; a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -138,7 +138,7 @@ a; " `; -exports[`no-newline.js 3`] = ` +exports[`no-newline.js-typescript 1`] = ` "\\"use strict\\"; a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -147,7 +147,7 @@ a; " `; -exports[`test.js 1`] = ` +exports[`test.js-babylon 1`] = ` "\\"use strict\\"; function fn() { @@ -162,7 +162,7 @@ function fn() { " `; -exports[`test.js 2`] = ` +exports[`test.js-flow 1`] = ` "\\"use strict\\"; function fn() { @@ -177,7 +177,7 @@ function fn() { " `; -exports[`test.js 3`] = ` +exports[`test.js-typescript 1`] = ` "\\"use strict\\"; function fn() { diff --git a/tests/do/__snapshots__/jsfmt.spec.js.snap b/tests/do/__snapshots__/jsfmt.spec.js.snap index 4fd7295ab..0dae9e4b6 100644 --- a/tests/do/__snapshots__/jsfmt.spec.js.snap +++ b/tests/do/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`do.js 1`] = ` +exports[`do.js-babylon 1`] = ` "const envSpecific = { domain: do { diff --git a/tests/dynamic_import/__snapshots__/jsfmt.spec.js.snap b/tests/dynamic_import/__snapshots__/jsfmt.spec.js.snap index be41fd386..e953a6bc8 100644 --- a/tests/dynamic_import/__snapshots__/jsfmt.spec.js.snap +++ b/tests/dynamic_import/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-babylon 1`] = ` "import(\\"module.js\\"); import(\\"module.js\\").then((a) => a); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap b/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap index 3e0a3efc2..beec8ed86 100644 --- a/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/empty_paren_comment/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`empty_paren_comment.js 1`] = ` +exports[`empty_paren_comment.js-babylon 1`] = ` "let f = (/* ... */) => {} (function (/* ... */) {})(/* ... */) function f(/* ... */) {} @@ -55,7 +55,7 @@ f(/* ... */ a, b); " `; -exports[`empty_paren_comment.js 2`] = ` +exports[`empty_paren_comment.js-flow 1`] = ` "let f = (/* ... */) => {} (function (/* ... */) {})(/* ... */) function f(/* ... */) {} diff --git a/tests/empty_statement/__snapshots__/jsfmt.spec.js.snap b/tests/empty_statement/__snapshots__/jsfmt.spec.js.snap index 4e237c71b..bfe8f31a8 100644 --- a/tests/empty_statement/__snapshots__/jsfmt.spec.js.snap +++ b/tests/empty_statement/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`body.js 1`] = ` +exports[`body.js-flow 1`] = ` "with (a); if (1); else if (2); else; for (;;); @@ -22,7 +22,7 @@ while (1); " `; -exports[`body.js 2`] = ` +exports[`body.js-typescript 1`] = ` "with (a); if (1); else if (2); else; for (;;); diff --git a/tests/es6modules/__snapshots__/jsfmt.spec.js.snap b/tests/es6modules/__snapshots__/jsfmt.spec.js.snap index c10231b6f..8152f9793 100644 --- a/tests/es6modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/es6modules/__snapshots__/jsfmt.spec.js.snap @@ -1,139 +1,139 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`export_default_arrow_expression.js 1`] = ` +exports[`export_default_arrow_expression.js-babylon 1`] = ` "export default () => {}; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default () => {}; " `; -exports[`export_default_arrow_expression.js 2`] = ` +exports[`export_default_arrow_expression.js-flow 1`] = ` "export default () => {}; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default () => {}; " `; -exports[`export_default_call_expression.js 1`] = ` +exports[`export_default_call_expression.js-babylon 1`] = ` "export default foo() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default foo(); " `; -exports[`export_default_call_expression.js 2`] = ` +exports[`export_default_call_expression.js-flow 1`] = ` "export default foo() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default foo(); " `; -exports[`export_default_class_declaration.js 1`] = ` +exports[`export_default_class_declaration.js-babylon 1`] = ` "export default class Foo {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default class Foo {} " `; -exports[`export_default_class_declaration.js 2`] = ` +exports[`export_default_class_declaration.js-flow 1`] = ` "export default class Foo {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default class Foo {} " `; -exports[`export_default_class_expression.js 1`] = ` +exports[`export_default_class_expression.js-babylon 1`] = ` "export default (class foobar {}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (class foobar {}); " `; -exports[`export_default_class_expression.js 2`] = ` +exports[`export_default_class_expression.js-flow 1`] = ` "export default (class foobar {}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (class foobar {}); " `; -exports[`export_default_function_declaration.js 1`] = ` +exports[`export_default_function_declaration.js-babylon 1`] = ` "export default function() {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default function() {} " `; -exports[`export_default_function_declaration.js 2`] = ` +exports[`export_default_function_declaration.js-flow 1`] = ` "export default function() {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default function() {} " `; -exports[`export_default_function_declaration_async.js 1`] = ` -"export default async function foo() {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export default (async function foo() {}); -" -`; - -exports[`export_default_function_declaration_async.js 2`] = ` +exports[`export_default_function_declaration_async.js-babylon 1`] = ` "export default async function foo() {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default async function foo() {} " `; -exports[`export_default_function_declaration_named.js 1`] = ` +exports[`export_default_function_declaration_async.js-flow 1`] = ` +"export default async function foo() {} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export default (async function foo() {}); +" +`; + +exports[`export_default_function_declaration_named.js-babylon 1`] = ` "export default function f(){} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default function f() {} " `; -exports[`export_default_function_declaration_named.js 2`] = ` +exports[`export_default_function_declaration_named.js-flow 1`] = ` "export default function f(){} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default function f() {} " `; -exports[`export_default_function_expression.js 1`] = ` +exports[`export_default_function_expression.js-babylon 1`] = ` "export default (function() {}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (function() {}); " `; -exports[`export_default_function_expression.js 2`] = ` +exports[`export_default_function_expression.js-flow 1`] = ` "export default (function() {}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (function() {}); " `; -exports[`export_default_function_expression_named.js 1`] = ` +exports[`export_default_function_expression_named.js-babylon 1`] = ` "export default (function f(){}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (function f() {}); " `; -exports[`export_default_function_expression_named.js 2`] = ` +exports[`export_default_function_expression_named.js-flow 1`] = ` "export default (function f(){}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (function f() {}); " `; -exports[`export_default_new_expression.js 1`] = ` +exports[`export_default_new_expression.js-babylon 1`] = ` "export default new Foo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default new Foo(); " `; -exports[`export_default_new_expression.js 2`] = ` +exports[`export_default_new_expression.js-flow 1`] = ` "export default new Foo(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default new Foo(); diff --git a/tests/export/__snapshots__/jsfmt.spec.js.snap b/tests/export/__snapshots__/jsfmt.spec.js.snap index 3b651180e..846c21416 100644 --- a/tests/export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/export/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bracket.js 1`] = ` +exports[`bracket.js-flow 1`] = ` "export { runTaskForChanged, description, @@ -27,7 +27,7 @@ export { fitsIn, oneLine }; " `; -exports[`bracket.js 2`] = ` +exports[`bracket.js-flow 2`] = ` "export { runTaskForChanged, description, @@ -54,7 +54,7 @@ export {fitsIn, oneLine}; " `; -exports[`bracket.js 3`] = ` +exports[`bracket.js-typescript 1`] = ` "export { runTaskForChanged, description, @@ -81,7 +81,7 @@ export { fitsIn, oneLine }; " `; -exports[`bracket.js 4`] = ` +exports[`bracket.js-typescript 2`] = ` "export { runTaskForChanged, description, @@ -108,7 +108,7 @@ export {fitsIn, oneLine}; " `; -exports[`empty.js 1`] = ` +exports[`empty.js-flow 1`] = ` "export {}; export {} from \\".\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -117,7 +117,7 @@ export {} from \\".\\"; " `; -exports[`empty.js 2`] = ` +exports[`empty.js-flow 2`] = ` "export {}; export {} from \\".\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -126,7 +126,7 @@ export {} from \\".\\"; " `; -exports[`empty.js 3`] = ` +exports[`empty.js-typescript 1`] = ` "export {}; export {} from \\".\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -135,7 +135,7 @@ export {} from \\".\\"; " `; -exports[`empty.js 4`] = ` +exports[`empty.js-typescript 2`] = ` "export {}; export {} from \\".\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/export_default/__snapshots__/jsfmt.spec.js.snap b/tests/export_default/__snapshots__/jsfmt.spec.js.snap index d54eaf6dc..3eb7f2718 100644 --- a/tests/export_default/__snapshots__/jsfmt.spec.js.snap +++ b/tests/export_default/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`body.js 1`] = ` +exports[`body.js-flow 1`] = ` "export default (class {}[1] = 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (class {}[1] = 1); " `; -exports[`body.js 2`] = ` +exports[`body.js-typescript 1`] = ` "export default (class {}[1] = 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export default (class {}[1] = 1); diff --git a/tests/export_extension/__snapshots__/jsfmt.spec.js.snap b/tests/export_extension/__snapshots__/jsfmt.spec.js.snap index 460e2bfc2..2e2a83096 100644 --- a/tests/export_extension/__snapshots__/jsfmt.spec.js.snap +++ b/tests/export_extension/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`export.js 1`] = ` +exports[`export.js-babylon 1`] = ` "export * as ns from 'mod'; export v from 'mod'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/exports/__snapshots__/jsfmt.spec.js.snap b/tests/exports/__snapshots__/jsfmt.spec.js.snap index 2e871ee53..4797a0429 100644 --- a/tests/exports/__snapshots__/jsfmt.spec.js.snap +++ b/tests/exports/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-babylon 1`] = ` "export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\"; export a,{b} from \\"./baz\\"; diff --git a/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap b/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap index c6b6fd305..227ee0914 100644 --- a/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap +++ b/tests/expression_statement/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`no_regression.js 1`] = ` +exports[`no_regression.js-babylon 1`] = ` "// Ensure no regression. \\"use strict\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ exports[`no_regression.js 1`] = ` " `; -exports[`use_strict.js 1`] = ` +exports[`use_strict.js-babylon 1`] = ` "// Parentheses around expression statement should be preserved in this case. (\\"use strict\\"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/first_argument_expansion/__snapshots__/jsfmt.spec.js.snap b/tests/first_argument_expansion/__snapshots__/jsfmt.spec.js.snap index 6b86606bb..03b325d3a 100644 --- a/tests/first_argument_expansion/__snapshots__/jsfmt.spec.js.snap +++ b/tests/first_argument_expansion/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "setTimeout(function() { thing(); }, 500); diff --git a/tests/flow/abnormal/__snapshots__/jsfmt.spec.js.snap b/tests/flow/abnormal/__snapshots__/jsfmt.spec.js.snap index 3434a6bb6..220d73b14 100644 --- a/tests/flow/abnormal/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/abnormal/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`break-continue.js 1`] = ` +exports[`break-continue.js-flow 1`] = ` "function foo() { while(true) { break; } } @@ -23,7 +23,7 @@ function bar() { " `; -exports[`return.js 1`] = ` +exports[`return.js-flow 1`] = ` "function bar(x:number) { } function foo() { var x = null; diff --git a/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap b/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap index 824a6d115..d9a228318 100644 --- a/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/annot/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`annot.js 1`] = ` +exports[`annot.js-flow 1`] = ` "function foo(str:string, i:number):string { return str; } @@ -194,7 +194,7 @@ type f = ?arg => void; " `; -exports[`forward_ref.js 1`] = ` +exports[`forward_ref.js-flow 1`] = ` "let myClassInstance: MyClass = null; // forward ref ok, null ~> class error function bar(): MyClass { @@ -229,7 +229,7 @@ function foo() { " `; -exports[`issue-530.js 1`] = ` +exports[`issue-530.js-flow 1`] = ` "function foo(...args: any) { } module.exports = foo; @@ -240,7 +240,7 @@ module.exports = foo; " `; -exports[`leak.js 1`] = ` +exports[`leak.js-flow 1`] = ` "/** @flow */ /* This test documents an example we ran into of a type annotation leaking. @@ -289,7 +289,7 @@ function bar(y: MyObj): string { " `; -exports[`other.js 1`] = ` +exports[`other.js-flow 1`] = ` "class C { } module.exports = (C: any); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -298,7 +298,7 @@ module.exports = (C: any); " `; -exports[`scope.js 1`] = ` +exports[`scope.js-flow 1`] = ` "type Merge = (a: T, b: T) => T; // hypothetical immutable map @@ -355,7 +355,7 @@ class Foo { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var C = require('./other'); ((0: C): string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/annot/any/__snapshots__/jsfmt.spec.js.snap b/tests/flow/annot/any/__snapshots__/jsfmt.spec.js.snap index 2232cb0e0..1766566e1 100644 --- a/tests/flow/annot/any/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/annot/any/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "type T = any; export default class { @@ -23,7 +23,7 @@ export default class { " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "import A from \\"./A\\" class B extends A { diff --git a/tests/flow/annot2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/annot2/__snapshots__/jsfmt.spec.js.snap index 331453070..b792b47bd 100644 --- a/tests/flow/annot2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/annot2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -33,7 +33,7 @@ export default class { " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/** * @flow */ @@ -56,7 +56,7 @@ class B extends A { " `; -exports[`T.js 1`] = ` +exports[`T.js-flow 1`] = ` "/** * @providesModule T */ diff --git a/tests/flow/any/__snapshots__/jsfmt.spec.js.snap b/tests/flow/any/__snapshots__/jsfmt.spec.js.snap index 2404ac011..c5752d88d 100644 --- a/tests/flow/any/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/any/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`any.js 1`] = ` +exports[`any.js-flow 1`] = ` "// @flow function foo(x:any):any { return x; } @@ -29,7 +29,7 @@ var z: string = qux(0); " `; -exports[`anyexportflowfile.js 1`] = ` +exports[`anyexportflowfile.js-flow 1`] = ` "// @flow module.exports = ((x: any) => x: any); @@ -40,7 +40,7 @@ module.exports = ((x: any) => x: any); " `; -exports[`flowfixme.js 1`] = ` +exports[`flowfixme.js-flow 1`] = ` "/* FlowFixMe is a synonym for any, used by the Flow team to signal a needed mod to JS devs. @@ -91,7 +91,7 @@ var w: string = baz(0); " `; -exports[`flowissue.js 1`] = ` +exports[`flowissue.js-flow 1`] = ` "/* $FlowIssue is a synonym for any, used by JS devs to signal a potential typechecker bug to the Flow team. @@ -142,7 +142,7 @@ var w: string = baz(0); " `; -exports[`nonflowfile.js 1`] = ` +exports[`nonflowfile.js-flow 1`] = ` "// @noflow module.exports = (x) => x; @@ -153,7 +153,7 @@ module.exports = x => x; " `; -exports[`propagate.js 1`] = ` +exports[`propagate.js-flow 1`] = ` "// @flow declare class C { @@ -208,7 +208,7 @@ function bar2(x: mixed) { " `; -exports[`reach.js 1`] = ` +exports[`reach.js-flow 1`] = ` "/** * like class and function values, any-typed values may be used in * type annotations. Here we test propagation of any through the diff --git a/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap index 7996a15ff..d115695e2 100644 --- a/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arith/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Arith.js 1`] = ` +exports[`Arith.js-flow 1`] = ` " /* @providesModule Arith */ @@ -186,7 +186,7 @@ let tests = [ " `; -exports[`exponent.js 1`] = ` +exports[`exponent.js-flow 1`] = ` "/* @flow */ let x: number = 2 ** 3; @@ -213,7 +213,7 @@ y **= 2; // error " `; -exports[`generic.js 1`] = ` +exports[`generic.js-flow 1`] = ` "/* @flow */ function f(a: A): A { return a + a; } // error @@ -242,7 +242,7 @@ function f(a: A, b: B): B { " `; -exports[`mult.js 1`] = ` +exports[`mult.js-flow 1`] = ` "/* @flow */ function num(x:number) { } @@ -271,7 +271,7 @@ y *= 2; // error " `; -exports[`relational.js 1`] = ` +exports[`relational.js-flow 1`] = ` "/* @flow */ (1 < 2); diff --git a/tests/flow/array-filter/__snapshots__/jsfmt.spec.js.snap b/tests/flow/array-filter/__snapshots__/jsfmt.spec.js.snap index 392a38943..286af0d80 100644 --- a/tests/flow/array-filter/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/array-filter/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/* @flow */ function filterOutVoids (arr: Array): Array { @@ -23,7 +23,7 @@ function filterOutSmall(arr: Array): Array { " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "/* @flow */ function filterItems(items: Array): Array { diff --git a/tests/flow/array_spread/__snapshots__/jsfmt.spec.js.snap b/tests/flow/array_spread/__snapshots__/jsfmt.spec.js.snap index 458cf3147..4907fea13 100644 --- a/tests/flow/array_spread/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/array_spread/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var A = [1,2,3]; var B = [...A]; var C = [1,2,3]; diff --git a/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap index c6ec7c02a..d415f4ddc 100644 --- a/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arraylib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array_lib.js 1`] = ` +exports[`array_lib.js-flow 1`] = ` "/* @flow */ function foo(x:string) { } diff --git a/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap index b98fa23dc..4468f0b42 100644 --- a/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arrays/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Arrays.js 1`] = ` +exports[`Arrays.js-flow 1`] = ` " /* @providesModule Arrays */ @@ -82,7 +82,7 @@ module.exports = \\"arrays\\"; " `; -exports[`comments.js 1`] = ` +exports[`comments.js-flow 1`] = ` "export type FileMetaData = [ /* id */ string, /* mtime */ number, @@ -103,7 +103,7 @@ export type ModuleMetaData = [Path, /* type */ number]; " `; -exports[`numeric_elem.js 1`] = ` +exports[`numeric_elem.js-flow 1`] = ` "var arr = []; var day = new Date; @@ -122,7 +122,7 @@ arr[day] = 0; " `; -exports[`union.js 1`] = ` +exports[`union.js-flow 1`] = ` "let arr: (number|string)[] = []; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ let arr: (number | string)[] = []; diff --git a/tests/flow/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/flow/arrows/__snapshots__/jsfmt.spec.js.snap index 16371dee8..f6f4821ba 100644 --- a/tests/flow/arrows/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/arrows/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`advanced_arrows.js 1`] = ` +exports[`advanced_arrows.js-flow 1`] = ` "/** * @flow */ @@ -27,7 +27,7 @@ var ident = (x: T): T => x; " `; -exports[`arrows.js 1`] = ` +exports[`arrows.js-flow 1`] = ` "function selectBestEffortImageForWidth( maxWidth: number, images: Array diff --git a/tests/flow/async/__snapshots__/jsfmt.spec.js.snap b/tests/flow/async/__snapshots__/jsfmt.spec.js.snap index 623b46c99..7e5ee5fb6 100644 --- a/tests/flow/async/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/async/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`async.js 1`] = ` +exports[`async.js-flow 1`] = ` "// @flow // \\"For async functions, a Promise is returned, @@ -117,7 +117,7 @@ var objf: () => Promise = obj.f; " `; -exports[`async_base_class.js 1`] = ` +exports[`async_base_class.js-flow 1`] = ` "// This is kind of weird, but it should parse. This works in babel without the // parens around (await promise). From the es6 and async/await specs I (nmote) // am not clear on whether it should. In any case it's a strange corner case @@ -150,7 +150,7 @@ async function foo() { " `; -exports[`async_parse.js 1`] = ` +exports[`async_parse.js-flow 1`] = ` "async function f() {} async function ft(a: T) {} @@ -203,7 +203,7 @@ var y = { async }; " `; -exports[`async_promise.js 1`] = ` +exports[`async_promise.js-flow 1`] = ` "async function f(): Promise { return Promise.resolve(1); } @@ -214,7 +214,7 @@ async function f(): Promise { " `; -exports[`async_return_void.js 1`] = ` +exports[`async_return_void.js-flow 1`] = ` "// @flow async function foo1(): Promise { @@ -247,7 +247,7 @@ async function foo3(): Promise { " `; -exports[`async2.js 1`] = ` +exports[`async2.js-flow 1`] = ` "// @flow // misc basic @@ -374,7 +374,7 @@ function test5() { " `; -exports[`async3.js 1`] = ` +exports[`async3.js-flow 1`] = ` "// @flow /** @@ -442,7 +442,7 @@ async function baz() { " `; -exports[`await_parse.js 1`] = ` +exports[`await_parse.js-flow 1`] = ` "async function f() { await 1; } async function ft(a: T) { await 1; } diff --git a/tests/flow/async_iteration/__snapshots__/jsfmt.spec.js.snap b/tests/flow/async_iteration/__snapshots__/jsfmt.spec.js.snap index 5a62f4532..f7ebc1665 100644 --- a/tests/flow/async_iteration/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/async_iteration/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`delegate_yield.js 1`] = ` +exports[`delegate_yield.js-flow 1`] = ` "async function *delegate_next() { async function *inner() { var x: void = yield; // error: number ~> void @@ -57,7 +57,7 @@ async function* delegate_return() { " `; -exports[`generator.js 1`] = ` +exports[`generator.js-flow 1`] = ` "declare interface File { readLine(): Promise; close(): void; @@ -112,7 +112,7 @@ async function f() { " `; -exports[`return.js 1`] = ` +exports[`return.js-flow 1`] = ` "declare var gen: AsyncGenerator; // You can pass whatever you like to return, it doesn't need to be related to @@ -161,7 +161,7 @@ refuse_return().return(\\"string\\").then(result => { " `; -exports[`throw.js 1`] = ` +exports[`throw.js-flow 1`] = ` "async function *catch_return() { try { yield 0; diff --git a/tests/flow/autocomplete/__snapshots__/jsfmt.spec.js.snap b/tests/flow/autocomplete/__snapshots__/jsfmt.spec.js.snap index 478e73aed..980f8654a 100644 --- a/tests/flow/autocomplete/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/autocomplete/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`customfun.js 1`] = ` +exports[`customfun.js-flow 1`] = ` "// @flow declare var idx: $Facebookism$Idx; @@ -27,7 +27,7 @@ m; " `; -exports[`unknown.js 1`] = ` +exports[`unknown.js-flow 1`] = ` "// @noflow module.exports = { x: { y: \\"\\" } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/auxiliary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/auxiliary/__snapshots__/jsfmt.spec.js.snap index 4687a8d8e..3c73ceff6 100644 --- a/tests/flow/auxiliary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/auxiliary/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var y:number = x; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var y: number = x; diff --git a/tests/flow/auxiliary/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/auxiliary/lib/__snapshots__/jsfmt.spec.js.snap index 5180d35de..2c45be131 100644 --- a/tests/flow/auxiliary/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/auxiliary/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare var x: string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare var x: string; diff --git a/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap index 8f5a54fcb..9322aad1c 100644 --- a/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/binary/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`in.js 1`] = ` +exports[`in.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/binding/__snapshots__/jsfmt.spec.js.snap b/tests/flow/binding/__snapshots__/jsfmt.spec.js.snap index 1ee41050c..863b34e49 100644 --- a/tests/flow/binding/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/binding/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`const.js 1`] = ` +exports[`const.js-flow 1`] = ` "const x = 0; // errors: const cannot be reassigned @@ -59,7 +59,7 @@ for (const { baz } of bazzes) { " `; -exports[`rebinding.js 1`] = ` +exports[`rebinding.js-flow 1`] = ` "/* @flow * test errors on illegal rebinding/reassignment * @@ -458,7 +458,7 @@ function fn_params_clash_fn_binding(x, y) { " `; -exports[`scope.js 1`] = ` +exports[`scope.js-flow 1`] = ` "function block_scope() { let a: number = 0; var b: number = 0; @@ -687,7 +687,7 @@ function default_param_2() { " `; -exports[`tdz.js 1`] = ` +exports[`tdz.js-flow 1`] = ` "/** @flow */ // -- types --- diff --git a/tests/flow/bom/__snapshots__/jsfmt.spec.js.snap b/tests/flow/bom/__snapshots__/jsfmt.spec.js.snap index 7a8c5584c..02a5f00b7 100644 --- a/tests/flow/bom/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/bom/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`FormData.js 1`] = ` +exports[`FormData.js-flow 1`] = ` "/* @flow */ // constructor @@ -148,7 +148,7 @@ for (let [x, y]: [number, number] of a.entries()) { " `; -exports[`MutationObserver.js 1`] = ` +exports[`MutationObserver.js-flow 1`] = ` "/* @flow */ // constructor diff --git a/tests/flow/bounded_poly/__snapshots__/jsfmt.spec.js.snap b/tests/flow/bounded_poly/__snapshots__/jsfmt.spec.js.snap index 2698f0005..f2619b2c7 100644 --- a/tests/flow/bounded_poly/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/bounded_poly/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`scope.js 1`] = ` +exports[`scope.js-flow 1`] = ` "function foo(x:X, y:Y):void { } foo(0, \\"\\"); @@ -15,7 +15,7 @@ function bar(x: X, y: Y): number { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "function foo(x: T): T { var _ = x * 1; // OK var y: string = x; // error diff --git a/tests/flow/break/__snapshots__/jsfmt.spec.js.snap b/tests/flow/break/__snapshots__/jsfmt.spec.js.snap index e6819ea80..34f1ae9ce 100644 --- a/tests/flow/break/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/break/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`break.js 1`] = ` +exports[`break.js-flow 1`] = ` "function foo(b) { var x = b ? null: false; var z; diff --git a/tests/flow/builtin_uses/__snapshots__/jsfmt.spec.js.snap b/tests/flow/builtin_uses/__snapshots__/jsfmt.spec.js.snap index 8951f4bd7..89238873c 100644 --- a/tests/flow/builtin_uses/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/builtin_uses/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var o = Object.freeze({ foo: 0 }); (o.foo: string); module.exports = o; @@ -11,7 +11,7 @@ module.exports = o; " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "var o = require('./test'); (o.foo: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/builtins/__snapshots__/jsfmt.spec.js.snap b/tests/flow/builtins/__snapshots__/jsfmt.spec.js.snap index 86a1670bc..bc960dc47 100644 --- a/tests/flow/builtins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/builtins/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array.js 1`] = ` +exports[`array.js-flow 1`] = ` "var a = [\\"...\\"]; var b = a.map (function (x) { return 0; }); var c: string = b[0]; // error: number !~> string @@ -45,7 +45,7 @@ function g() { " `; -exports[`genericfoo.js 1`] = ` +exports[`genericfoo.js-flow 1`] = ` "class Foo { x:T; self():Foo { return this; } diff --git a/tests/flow/call_properties/__snapshots__/jsfmt.spec.js.snap b/tests/flow/call_properties/__snapshots__/jsfmt.spec.js.snap index 18494e19e..2f51971ad 100644 --- a/tests/flow/call_properties/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/call_properties/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "// You should be able to call objects with call properties function a(f: { (): string }, g: { (x: number): string } ): string { return f() + g(123); @@ -65,7 +65,7 @@ function f(): number { " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// You should be able to use a function as an object with a call property var a: { (x: number): string } = function (x: number): string { return \\"hi\\"; }; @@ -124,7 +124,7 @@ var z: Object = function(x: number): string { " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "// You should be able to use an object as a function function a(x: { (z: number): string }): (z: number) => string { return x; @@ -197,7 +197,7 @@ function g(x: {}): Function { " `; -exports[`D.js 1`] = ` +exports[`D.js-flow 1`] = ` "// Multiple call properties should also be supported function a(f: { (): string; (x: number): string }): string { return f() + f(123); @@ -248,7 +248,7 @@ function e(x: { (): string, (x: number): string }): () => number { " `; -exports[`E.js 1`] = ` +exports[`E.js-flow 1`] = ` "// Expecting properties that don't exist should be an error var a : { someProp: number } = function () {}; @@ -273,7 +273,7 @@ var c: { myProp: number } = f; " `; -exports[`F.js 1`] = ` +exports[`F.js-flow 1`] = ` "// You should be able to use an arrow function as an object with a call property var a: { (x: number): string } = (x) => x.toString() diff --git a/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap index 2fdbc337f..6637715c1 100644 --- a/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/callable/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`optional.js 1`] = ` +exports[`optional.js-flow 1`] = ` "type F = { (x: string): number; p?: string; @@ -25,7 +25,7 @@ function f(x) { " `; -exports[`primitives.js 1`] = ` +exports[`primitives.js-flow 1`] = ` "var x = Boolean(4); function foo(fn:(value:any)=>boolean) { } foo(Boolean); diff --git a/tests/flow/check-contents/__snapshots__/jsfmt.spec.js.snap b/tests/flow/check-contents/__snapshots__/jsfmt.spec.js.snap index ce33d0702..c12e07ddc 100644 --- a/tests/flow/check-contents/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/check-contents/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`not_flow.js 1`] = ` +exports[`not_flow.js-flow 1`] = ` "1 * 'foo'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 * \\"foo\\"; diff --git a/tests/flow/class_munging/__snapshots__/jsfmt.spec.js.snap b/tests/flow/class_munging/__snapshots__/jsfmt.spec.js.snap index db48dcb2c..e5a76ca28 100644 --- a/tests/flow/class_munging/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/class_munging/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`with_munging.js 1`] = ` +exports[`with_munging.js-flow 1`] = ` "/** * @flow */ @@ -35,7 +35,7 @@ class Bar extends Foo { " `; -exports[`without_munging.js 1`] = ` +exports[`without_munging.js-flow 1`] = ` "/** * @flow * @preventMunge diff --git a/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap b/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap index cf38583f1..055fb06a1 100644 --- a/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/class_statics/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class A { static x: number; static y: string; diff --git a/tests/flow/class_subtyping/__snapshots__/jsfmt.spec.js.snap b/tests/flow/class_subtyping/__snapshots__/jsfmt.spec.js.snap index 3d3d43382..cd1a0cbe5 100644 --- a/tests/flow/class_subtyping/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/class_subtyping/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/* @flow */ class A {} class B {} @@ -15,7 +15,7 @@ module.exports = { A, B }; " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "/* @flow */ var I = require(\\"./test.js\\"); @@ -34,7 +34,7 @@ var y: I.B = new C(); " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "class A {} class B extends A {} class C extends B {} @@ -51,7 +51,7 @@ var a: A> = c; // the third type arg is incorrect " `; -exports[`test4.js 1`] = ` +exports[`test4.js-flow 1`] = ` "class C { x: X; } function foo(c: C, x: X) { } diff --git a/tests/flow/class_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/class_type/__snapshots__/jsfmt.spec.js.snap index 89e01640d..9e38db566 100644 --- a/tests/flow/class_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/class_type/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class A { } function foo(x: Class): A { return new x(); // OK @@ -27,7 +27,7 @@ function bar(x: Class): B { " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "// A function to typecheck values against their types. Covariance of Class<.> // makes it useless in such a function (when limited to classes and instances), // since everything can be trivially satisfied by going to \`mixed\`. diff --git a/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap b/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap index 206577172..af14b2b5f 100644 --- a/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/classes/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "class A { foo(x:number):void { } } @@ -15,7 +15,7 @@ module.exports = A; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "var A = require('./A'); class B extends A { } @@ -36,7 +36,7 @@ module.exports = B; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "var B = require('./B'); class C extends B { @@ -61,7 +61,7 @@ module.exports = C; " `; -exports[`D.js 1`] = ` +exports[`D.js-flow 1`] = ` "class D { } class E { } new E().x @@ -72,7 +72,7 @@ new E().x; " `; -exports[`class_shapes.js 1`] = ` +exports[`class_shapes.js-flow 1`] = ` "/* @flow */ type Foo = { @@ -147,7 +147,7 @@ var w: Foo = z; " `; -exports[`expr.js 1`] = ` +exports[`expr.js-flow 1`] = ` "var Bar = class Foo { static factory(): Foo { // OK: Foo is a type in this scope return new Foo() // OK: Foo is a runtime binding in this scope @@ -213,7 +213,7 @@ var alias2: Alias = _Alias.factory(); // error: bad pun " `; -exports[`loc.js 1`] = ` +exports[`loc.js-flow 1`] = ` "/* @flow */ type Foo = number @@ -228,7 +228,7 @@ class Foo {} // error, shadows type Foo " `; -exports[`statics.js 1`] = ` +exports[`statics.js-flow 1`] = ` "/* @flow */ class C { diff --git a/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap b/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap index 76625bc09..d6fe11ee2 100644 --- a/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/closure/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Closure.js 1`] = ` +exports[`Closure.js-flow 1`] = ` "/*** * Test tracking of variable types across closure calls. * @flow @@ -171,7 +171,7 @@ function local_meth() { " `; -exports[`cond_havoc.js 1`] = ` +exports[`cond_havoc.js-flow 1`] = ` "// @flow // from sam, https://github.com/facebook/flow/issues/780 @@ -204,7 +204,7 @@ function example(b: boolean): number { " `; -exports[`const.js 1`] = ` +exports[`const.js-flow 1`] = ` "/*** * consts retain refinements * @flow diff --git a/tests/flow/commonjs/__snapshots__/jsfmt.spec.js.snap b/tests/flow/commonjs/__snapshots__/jsfmt.spec.js.snap index e0abce678..2c05e643d 100644 --- a/tests/flow/commonjs/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/commonjs/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Abs.js 1`] = ` +exports[`Abs.js-flow 1`] = ` " function f(x:string) { } @@ -12,7 +12,7 @@ module.exports = f; " `; -exports[`Rel.js 1`] = ` +exports[`Rel.js-flow 1`] = ` " var f = require('./Abs'); diff --git a/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap b/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap index bf1ffc18e..9eadf1797 100644 --- a/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/computed_props/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var ColorId = { RED: 'R', GREEN: 'G', @@ -51,7 +51,7 @@ module.exports = { ColorId, ColorNumber }; " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "var { ColorId, ColorNumber } = require('./test'); var ColorIdToNumber = { [ColorId.RED]: ColorNumber.RED, @@ -76,7 +76,7 @@ module.exports = ColorIdToNumber; " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "var { ColorId } = require('./test'); var ColorIdToNumber = require('./test2'); @@ -89,14 +89,14 @@ var ColorIdToNumber = require(\\"./test2\\"); " `; -exports[`test4.js 1`] = ` +exports[`test4.js-flow 1`] = ` "module.exports = 'hello'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = \\"hello\\"; " `; -exports[`test5.js 1`] = ` +exports[`test5.js-flow 1`] = ` "var hello = require('./test4'); var dummy = require('./test'); module.exports = { @@ -115,7 +115,7 @@ module.exports = { " `; -exports[`test6.js 1`] = ` +exports[`test6.js-flow 1`] = ` "var o = require('./test5'); (o.hello: 'nothing'); // oops ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -124,7 +124,7 @@ var o = require(\\"./test5\\"); " `; -exports[`test7.js 1`] = ` +exports[`test7.js-flow 1`] = ` "var obj = {x: 0, m() { return this.x }} var x: string = obj['m'](); // error, number ~> string diff --git a/tests/flow/conditional/__snapshots__/jsfmt.spec.js.snap b/tests/flow/conditional/__snapshots__/jsfmt.spec.js.snap index e6e2a20ff..51ae4e1ee 100644 --- a/tests/flow/conditional/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/conditional/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`conditional.js 1`] = ` +exports[`conditional.js-flow 1`] = ` "/* @flow */ function a(): number { diff --git a/tests/flow/config_all/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_all/__snapshots__/jsfmt.spec.js.snap index b7196c185..35459c0d1 100644 --- a/tests/flow/config_all/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_all/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`no_at_flow.js 1`] = ` +exports[`no_at_flow.js-flow 1`] = ` "var x: number = \\"not a number\\"; // Error: string ~> number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var x: number = \\"not a number\\"; // Error: string ~> number diff --git a/tests/flow/config_all_false/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_all_false/__snapshots__/jsfmt.spec.js.snap index 9dafaf24e..d0d9702ec 100644 --- a/tests/flow/config_all_false/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_all_false/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`no_at_flow.js 1`] = ` +exports[`no_at_flow.js-flow 1`] = ` "var x: number = \\"not a number\\"; // No error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var x: number = \\"not a number\\"; // No error diff --git a/tests/flow/config_all_weak/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_all_weak/__snapshots__/jsfmt.spec.js.snap index 66434aa78..5cde37537 100644 --- a/tests/flow/config_all_weak/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_all_weak/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`no_at_flow.js 1`] = ` +exports[`no_at_flow.js-flow 1`] = ` "var x; x.length; diff --git a/tests/flow/config_file_extensions/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_file_extensions/__snapshots__/jsfmt.spec.js.snap index 7a83d74e7..2f29ec62c 100644 --- a/tests/flow/config_file_extensions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_file_extensions/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/* * @flow */ diff --git a/tests/flow/config_ignore/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_ignore/__snapshots__/jsfmt.spec.js.snap index 2f54b95c0..16946381b 100644 --- a/tests/flow/config_ignore/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_ignore/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "/* @flow */ // No error, this file is ignored diff --git a/tests/flow/config_ignore/dir/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_ignore/dir/__snapshots__/jsfmt.spec.js.snap index b043acce5..badf32f2e 100644 --- a/tests/flow/config_ignore/dir/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_ignore/dir/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "/* @flow */ var x: number = \\"string\\"; // Error string ~> number diff --git a/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/__snapshots__/jsfmt.spec.js.snap index cb4e02453..68c468dbe 100644 --- a/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow import {test} from 'testmodule'; diff --git a/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/src/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/src/__snapshots__/jsfmt.spec.js.snap index ed693ef74..77e879c88 100644 --- a/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/src/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_mapper_PROJECT_ROOT-1.0/src/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`testmodule.js 1`] = ` +exports[`testmodule.js-flow 1`] = ` "// @flow export let test = 42; diff --git a/tests/flow/config_module_name_mapper_filetype/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_mapper_filetype/__snapshots__/jsfmt.spec.js.snap index 29a008328..4b8a530f0 100644 --- a/tests/flow/config_module_name_mapper_filetype/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_mapper_filetype/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow import {className} from \\"./SomeCSSFile.css\\"; diff --git a/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap index 8bb8fc4e7..ead9c2a89 100644 --- a/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_rewrite_haste/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/* @flow */ var m1 = require('1DoesntExist'); @@ -31,7 +31,7 @@ import { numVal as numVal2 } from \\"3DoesntExist\\"; // Error " `; -exports[`Exists.js 1`] = ` +exports[`Exists.js-flow 1`] = ` "/** * @providesModule Exists * @flow diff --git a/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap index 39629c769..8e6339326 100644 --- a/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_name_rewrite_node/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/* @flow */ var m1 = require('./1DoesntExist'); @@ -55,7 +55,7 @@ var c_4: string = numVal3; // Error: number ~> string " `; -exports[`Exists.js 1`] = ` +exports[`Exists.js-flow 1`] = ` "/* @flow */ module.exports = { diff --git a/tests/flow/config_module_system_node_resolve_dirname/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_system_node_resolve_dirname/__snapshots__/jsfmt.spec.js.snap index 8e952737f..8ace7cbd6 100644 --- a/tests/flow/config_module_system_node_resolve_dirname/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_system_node_resolve_dirname/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`toplevel.js 1`] = ` +exports[`toplevel.js-flow 1`] = ` "// @flow import {name} from \\"testproj\\"; diff --git a/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj/__snapshots__/jsfmt.spec.js.snap index a62797762..f4dd5af9f 100644 --- a/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "// @flow export var name: \\"otherdir/testproj\\" = \\"otherdir/testproj\\"; diff --git a/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap index 0b954827c..1dfaa0563 100644 --- a/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_system_node_resolve_dirname/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "// @flow export var name: \\"otherdir/testproj2\\" = \\"otherdir/testproj2\\"; diff --git a/tests/flow/config_module_system_node_resolve_dirname/subdir/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_system_node_resolve_dirname/subdir/__snapshots__/jsfmt.spec.js.snap index 10be9f9ac..62d411f8d 100644 --- a/tests/flow/config_module_system_node_resolve_dirname/subdir/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_system_node_resolve_dirname/subdir/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`sublevel.js 1`] = ` +exports[`sublevel.js-flow 1`] = ` "// @flow import {name} from \\"testproj2\\"; diff --git a/tests/flow/config_module_system_node_resolve_dirname/subdir/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_module_system_node_resolve_dirname/subdir/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap index c63d663fd..564479bb2 100644 --- a/tests/flow/config_module_system_node_resolve_dirname/subdir/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_module_system_node_resolve_dirname/subdir/custom_resolve_dir/testproj2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "// @flow export var name: \\"subdir/custom_resolve_dir/testproj2\\" = \\"subdir/custom_resolve_dir/testproj2\\"; diff --git a/tests/flow/config_munging_underscores/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_munging_underscores/__snapshots__/jsfmt.spec.js.snap index 03e8baf23..9362ee692 100644 --- a/tests/flow/config_munging_underscores/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_munging_underscores/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`chain.js 1`] = ` +exports[`chain.js-flow 1`] = ` "/* @flow */ class A { @@ -73,7 +73,7 @@ B._sProperty = \\"B._sProperty string\\"; " `; -exports[`commonjs_export.js 1`] = ` +exports[`commonjs_export.js-flow 1`] = ` "/* @flow */ class C { @@ -92,7 +92,7 @@ module.exports = new C(); " `; -exports[`commonjs_import.js 1`] = ` +exports[`commonjs_import.js-flow 1`] = ` "/* @flow */ import {_p} from \\"./commonjs_export\\"; diff --git a/tests/flow/config_munging_underscores2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/config_munging_underscores2/__snapshots__/jsfmt.spec.js.snap index 5d87fdbb7..872aa2b0c 100644 --- a/tests/flow/config_munging_underscores2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/config_munging_underscores2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`chain.js 1`] = ` +exports[`chain.js-flow 1`] = ` "/* @flow */ class A { diff --git a/tests/flow/const_params/__snapshots__/jsfmt.spec.js.snap b/tests/flow/const_params/__snapshots__/jsfmt.spec.js.snap index e3bf3240b..9aa610ed3 100644 --- a/tests/flow/const_params/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/const_params/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * test handling of const params * - reassignment prohibited diff --git a/tests/flow/constructor/__snapshots__/jsfmt.spec.js.snap b/tests/flow/constructor/__snapshots__/jsfmt.spec.js.snap index f5c85157c..6dd6aed99 100644 --- a/tests/flow/constructor/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/constructor/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`constructor.js 1`] = ` +exports[`constructor.js-flow 1`] = ` "class C { constructor() { } } diff --git a/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap b/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap index 528ae496c..be8f22bfa 100644 --- a/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/constructor_annots/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`constructors.js 1`] = ` +exports[`constructors.js-flow 1`] = ` "// Foo is a class-like function function Foo() { this.x = 0; // constructs objects with property x @@ -51,7 +51,7 @@ exports.Foo2 = (Foo: Class); " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var Foo = require('./constructors').Foo; var x: string = new Foo().x; // error, found number instead of string var y: string = Foo.y; // error, found number instead of string diff --git a/tests/flow/contents/ignore/__snapshots__/jsfmt.spec.js.snap b/tests/flow/contents/ignore/__snapshots__/jsfmt.spec.js.snap index 694ce4033..e2c5acd06 100644 --- a/tests/flow/contents/ignore/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/contents/ignore/__snapshots__/jsfmt.spec.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dummy.js 1`] = ` +exports[`dummy.js-flow 1`] = ` "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "require('./dummy'); var xxx = 0; xxx diff --git a/tests/flow/contents/no_flow/__snapshots__/jsfmt.spec.js.snap b/tests/flow/contents/no_flow/__snapshots__/jsfmt.spec.js.snap index 694ce4033..e2c5acd06 100644 --- a/tests/flow/contents/no_flow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/contents/no_flow/__snapshots__/jsfmt.spec.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dummy.js 1`] = ` +exports[`dummy.js-flow 1`] = ` "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "require('./dummy'); var xxx = 0; xxx diff --git a/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap b/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap index 7d6044832..06b5c76fc 100644 --- a/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/core_tests/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`boolean.js 1`] = ` +exports[`boolean.js-flow 1`] = ` "// @flow // Boolean (the class) tests. booleans (the literals) are not part of core.js @@ -89,7 +89,7 @@ let tests = [ " `; -exports[`map.js 1`] = ` +exports[`map.js-flow 1`] = ` "// @flow function* generator(): Iterable<[string, number]> { @@ -158,7 +158,7 @@ let tests = [ " `; -exports[`regexp.js 1`] = ` +exports[`regexp.js-flow 1`] = ` "// @flow let tests = [ @@ -221,7 +221,7 @@ let tests = [ " `; -exports[`weakset.js 1`] = ` +exports[`weakset.js-flow 1`] = ` "// @flow let ws = new WeakSet(); diff --git a/tests/flow/covariance/__snapshots__/jsfmt.spec.js.snap b/tests/flow/covariance/__snapshots__/jsfmt.spec.js.snap index 8659c0a9b..9dc75a6e8 100644 --- a/tests/flow/covariance/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/covariance/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type CovArrayVerbose = Array; var b: CovArrayVerbose = []; var y: CovArrayVerbose = b; diff --git a/tests/flow/coverage/__snapshots__/jsfmt.spec.js.snap b/tests/flow/coverage/__snapshots__/jsfmt.spec.js.snap index 5f1672f3b..cd3eeb063 100644 --- a/tests/flow/coverage/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/coverage/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`crash.js 1`] = ` +exports[`crash.js-flow 1`] = ` "// This file triggers a violation of the \\"disjoint-or-nested ranges invariant\\" // that we implicitly assume in type-at-pos and coverage implementations. In // particular, when unchecked it causes a crash with coverage --color. @@ -25,7 +25,7 @@ declare module bar { " `; -exports[`declare_module.js 1`] = ` +exports[`declare_module.js-flow 1`] = ` "// check coverage of declare module declare module foo { @@ -38,7 +38,7 @@ declare module foo { " `; -exports[`no_pragma.js 1`] = ` +exports[`no_pragma.js-flow 1`] = ` "let x = 0; (x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -47,7 +47,7 @@ let x = 0; " `; -exports[`non-termination.js 1`] = ` +exports[`non-termination.js-flow 1`] = ` "// This file triggers a violation of the \\"disjoint-or-nested ranges invariant\\" // that we implicitly assume in type-at-pos and coverage implementations. In // particular, when unchecked it causes non-termination with coverage --color. diff --git a/tests/flow/cycle/__snapshots__/jsfmt.spec.js.snap b/tests/flow/cycle/__snapshots__/jsfmt.spec.js.snap index c607473c5..7537438f0 100644 --- a/tests/flow/cycle/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/cycle/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "var B = require('./B'); class A extends B { } @@ -15,7 +15,7 @@ module.exports = A; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "var A = require('./A'); //class B extends A { } diff --git a/tests/flow/date/__snapshots__/jsfmt.spec.js.snap b/tests/flow/date/__snapshots__/jsfmt.spec.js.snap index ab080405f..7fde99128 100644 --- a/tests/flow/date/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/date/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`date.js 1`] = ` +exports[`date.js-flow 1`] = ` "var d = new Date(0); var x:string = d.getTime(); diff --git a/tests/flow/declaration_files_haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_haste/__snapshots__/jsfmt.spec.js.snap index ac70ad001..5c1e9c7e9 100644 --- a/tests/flow/declaration_files_haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_haste/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ExplicitProvidesModuleDifferentName.js 1`] = ` +exports[`ExplicitProvidesModuleDifferentName.js-flow 1`] = ` "/* * @providesModule ExplicitProvidesModuleDifferentName * @flow @@ -17,7 +17,7 @@ module.exports.fun = (): string => \\"hello there\\"; " `; -exports[`ExplicitProvidesModuleSameName.js 1`] = ` +exports[`ExplicitProvidesModuleSameName.js-flow 1`] = ` "/* * @providesModule ExplicitProvidesModuleSameName * @flow @@ -34,7 +34,7 @@ module.exports.fun = (): string => \\"hello there\\"; " `; -exports[`ImplicitProvidesModule.js 1`] = ` +exports[`ImplicitProvidesModule.js-flow 1`] = ` "/* * @providesModule ImplicitProvidesModule * @flow @@ -51,14 +51,14 @@ module.exports.fun = (): string => \\"hello there\\"; " `; -exports[`md5.js 1`] = ` +exports[`md5.js-flow 1`] = ` "/* @providesModule md5 */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @providesModule md5 */ " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/* @flow */ var Implicit = require('ImplicitProvidesModule'); diff --git a/tests/flow/declaration_files_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap index 8067ca3b3..0d62cda67 100644 --- a/tests/flow/declaration_files_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`min.js 1`] = ` +exports[`min.js-flow 1`] = ` "module.exports.fun = (): string => \\"hello there\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports.fun = (): string => \\"hello there\\"; diff --git a/tests/flow/declaration_files_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap index e98d04b0a..54cd068a5 100644 --- a/tests/flow/declaration_files_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`nested_test.js 1`] = ` +exports[`nested_test.js-flow 1`] = ` "/* @flow */ var docblock = require('qux/docblock'); diff --git a/tests/flow/declaration_files_haste/ws/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_haste/ws/__snapshots__/jsfmt.spec.js.snap index 3959b3ee8..42591c271 100644 --- a/tests/flow/declaration_files_haste/ws/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_haste/ws/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " `; diff --git a/tests/flow/declaration_files_haste/ws/test/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_haste/ws/test/__snapshots__/jsfmt.spec.js.snap index 551421890..deb31ecd9 100644 --- a/tests/flow/declaration_files_haste/ws/test/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_haste/ws/test/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var ws = require('../'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var ws = require(\\"../\\"); diff --git a/tests/flow/declaration_files_incremental_haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_incremental_haste/__snapshots__/jsfmt.spec.js.snap index 9694ecb5d..3da92710f 100644 --- a/tests/flow/declaration_files_incremental_haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_incremental_haste/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/* @providesModule A */ class Implementation {} export function foo(): Implementation { return new Implementation; } @@ -13,7 +13,7 @@ export function foo(): Implementation { " `; -exports[`ExplicitProvidesModuleDifferentName.js 1`] = ` +exports[`ExplicitProvidesModuleDifferentName.js-flow 1`] = ` "/* * @providesModule ExplicitProvidesModuleDifferentName * @flow @@ -32,7 +32,7 @@ module.exports.fun = (): Implementation => new Implementation(); " `; -exports[`ExplicitProvidesModuleSameName.js 1`] = ` +exports[`ExplicitProvidesModuleSameName.js-flow 1`] = ` "/* * @providesModule ExplicitProvidesModuleSameName * @flow @@ -51,7 +51,7 @@ module.exports.fun = (): Implementation => new Implementation(); " `; -exports[`ImplicitProvidesModule.js 1`] = ` +exports[`ImplicitProvidesModule.js-flow 1`] = ` "/* * @providesModule ImplicitProvidesModule * @flow @@ -70,14 +70,14 @@ module.exports.fun = (): Implementation => new Implementation(); " `; -exports[`md5.js 1`] = ` +exports[`md5.js-flow 1`] = ` "/* @providesModule md5 */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @providesModule md5 */ " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/* @flow */ var Implicit = require('ImplicitProvidesModule'); diff --git a/tests/flow/declaration_files_incremental_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_incremental_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap index b0cc8249c..154889f6a 100644 --- a/tests/flow/declaration_files_incremental_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_incremental_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`min.js 1`] = ` +exports[`min.js-flow 1`] = ` "class Implementation {} module.exports.fun = (): Implementation => new Implementation; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/declaration_files_incremental_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_incremental_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap index f0d02f704..3235825fe 100644 --- a/tests/flow/declaration_files_incremental_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_incremental_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`nested_test.js 1`] = ` +exports[`nested_test.js-flow 1`] = ` "/* @flow */ var docblock = require('qux/docblock'); diff --git a/tests/flow/declaration_files_incremental_haste/ws/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_incremental_haste/ws/__snapshots__/jsfmt.spec.js.snap index 3959b3ee8..42591c271 100644 --- a/tests/flow/declaration_files_incremental_haste/ws/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_incremental_haste/ws/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " `; diff --git a/tests/flow/declaration_files_incremental_haste/ws/test/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_incremental_haste/ws/test/__snapshots__/jsfmt.spec.js.snap index 551421890..deb31ecd9 100644 --- a/tests/flow/declaration_files_incremental_haste/ws/test/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_incremental_haste/ws/test/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var ws = require('../'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var ws = require(\\"../\\"); diff --git a/tests/flow/declaration_files_incremental_node/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_incremental_node/__snapshots__/jsfmt.spec.js.snap index 6d7ced592..82cbcfabe 100644 --- a/tests/flow/declaration_files_incremental_node/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_incremental_node/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "class Implementation {} export function foo(): Implementation { return new Implementation; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -11,7 +11,7 @@ export function foo(): Implementation { " `; -exports[`test_absolute.js 1`] = ` +exports[`test_absolute.js-flow 1`] = ` "/* @flow */ // This will require ./node_modules/B.js.flow @@ -98,7 +98,7 @@ var F = require(\\"package_with_dir_main\\"); " `; -exports[`test_relative.js 1`] = ` +exports[`test_relative.js-flow 1`] = ` "import { foo } from './A'; (foo(): boolean); // Error: either Implementation ~> boolean or Definition ~> boolean diff --git a/tests/flow/declaration_files_node/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declaration_files_node/__snapshots__/jsfmt.spec.js.snap index 091649c06..fcec1856b 100644 --- a/tests/flow/declaration_files_node/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declaration_files_node/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/* @flow */ module.exports.fun = (): string => 'hello there!'; @@ -11,7 +11,7 @@ module.exports.fun = (): string => \\"hello there!\\"; " `; -exports[`CJS.js 1`] = ` +exports[`CJS.js-flow 1`] = ` "// @flow module.exports = 42; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -20,7 +20,7 @@ module.exports = 42; " `; -exports[`test_absolute.js 1`] = ` +exports[`test_absolute.js-flow 1`] = ` "/* @flow */ // This will require ./node_modules/B.js.flow @@ -67,7 +67,7 @@ var F = require(\\"package_with_dir_main\\"); " `; -exports[`test_relative.js 1`] = ` +exports[`test_relative.js-flow 1`] = ` "/* @flow */ // This will require ./A.js.flow diff --git a/tests/flow/declare_class/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_class/__snapshots__/jsfmt.spec.js.snap index 0093346a6..8a50082bd 100644 --- a/tests/flow/declare_class/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_class/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`declare_class.js 1`] = ` +exports[`declare_class.js-flow 1`] = ` "declare class C { static x: number; static foo(x: number): void; diff --git a/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap index c6d76d684..7f6e644a2 100644 --- a/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_class/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "declare class _C { foo(): number; } diff --git a/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap index 0eac17d99..712acd4dd 100644 --- a/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_export/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/* @flow */ exports.numberValue = 42; @@ -11,14 +11,14 @@ exports.numberValue = 42; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "/* @flow */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @flow */ " `; -exports[`CommonJS_Clobbering_Class.js 1`] = ` +exports[`CommonJS_Clobbering_Class.js-flow 1`] = ` "/** * @providesModule CommonJS_Clobbering_Class * @flow @@ -75,7 +75,7 @@ module.exports = Test; " `; -exports[`CommonJS_Clobbering_Lit.js 1`] = ` +exports[`CommonJS_Clobbering_Lit.js-flow 1`] = ` "/** * @providesModule CommonJS_Clobbering_Lit * @flow @@ -104,7 +104,7 @@ module.exports = { " `; -exports[`CommonJS_Named.js 1`] = ` +exports[`CommonJS_Named.js-flow 1`] = ` "/** * @providesModule CommonJS_Named * @flow @@ -129,7 +129,7 @@ exports.numberValue5 = 5; " `; -exports[`ES6_Default_AnonFunction1.js 1`] = ` +exports[`ES6_Default_AnonFunction1.js-flow 1`] = ` "/** * @providesModule ES6_Default_AnonFunction1 * @flow @@ -146,7 +146,7 @@ declare export default () => number " `; -exports[`ES6_Default_AnonFunction2.js 1`] = ` +exports[`ES6_Default_AnonFunction2.js-flow 1`] = ` "/** * @providesModule ES6_Default_AnonFunction2 * @flow @@ -163,7 +163,7 @@ declare export default () => number " `; -exports[`ES6_Default_NamedClass1.js 1`] = ` +exports[`ES6_Default_NamedClass1.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedClass1 * @flow @@ -192,7 +192,7 @@ declare export function getAFoo(): FooImpl; " `; -exports[`ES6_Default_NamedClass2.js 1`] = ` +exports[`ES6_Default_NamedClass2.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedClass2 * @flow @@ -209,7 +209,7 @@ declare export default class Foo { givesANum(): number } " `; -exports[`ES6_Default_NamedFunction1.js 1`] = ` +exports[`ES6_Default_NamedFunction1.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedFunction1 * @flow @@ -226,7 +226,7 @@ declare export default function foo(): number; " `; -exports[`ES6_Default_NamedFunction2.js 1`] = ` +exports[`ES6_Default_NamedFunction2.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedFunction2 * @flow @@ -243,7 +243,7 @@ declare export default function foo(): number; " `; -exports[`ES6_DefaultAndNamed.js 1`] = ` +exports[`ES6_DefaultAndNamed.js-flow 1`] = ` "/* @flow */ declare export default number; @@ -256,7 +256,7 @@ declare export var str: string; " `; -exports[`ES6_ExportAllFrom_Intermediary1.js 1`] = ` +exports[`ES6_ExportAllFrom_Intermediary1.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Intermediary1 * @flow @@ -273,7 +273,7 @@ declare export * from \\"ES6_ExportAllFrom_Source1\\" " `; -exports[`ES6_ExportAllFrom_Intermediary2.js 1`] = ` +exports[`ES6_ExportAllFrom_Intermediary2.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Intermediary2 * @flow @@ -290,7 +290,7 @@ declare export * from \\"ES6_ExportAllFrom_Source2\\" " `; -exports[`ES6_ExportAllFrom_Source1.js 1`] = ` +exports[`ES6_ExportAllFrom_Source1.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Source1 * @flow @@ -307,7 +307,7 @@ declare export var numberValue1: number; " `; -exports[`ES6_ExportAllFrom_Source2.js 1`] = ` +exports[`ES6_ExportAllFrom_Source2.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Source2 * @flow @@ -324,7 +324,7 @@ declare export var numberValue2: number; " `; -exports[`ES6_ExportAllFromMulti.js 1`] = ` +exports[`ES6_ExportAllFromMulti.js-flow 1`] = ` "// @flow declare export * from \\"./ES6_ExportAllFrom_Source1\\"; @@ -337,7 +337,7 @@ declare export * from \\"./ES6_ExportAllFrom_Source2\\" " `; -exports[`ES6_ExportFrom_Intermediary1.js 1`] = ` +exports[`ES6_ExportFrom_Intermediary1.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Intermediary1 * @flow @@ -360,7 +360,7 @@ declare export { " `; -exports[`ES6_ExportFrom_Intermediary2.js 1`] = ` +exports[`ES6_ExportFrom_Intermediary2.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Intermediary2 * @flow @@ -383,7 +383,7 @@ declare export { " `; -exports[`ES6_ExportFrom_Source1.js 1`] = ` +exports[`ES6_ExportFrom_Source1.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Source1 * @flow @@ -402,7 +402,7 @@ declare export var numberValue2: number; " `; -exports[`ES6_ExportFrom_Source2.js 1`] = ` +exports[`ES6_ExportFrom_Source2.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Source2 * @flow @@ -421,7 +421,7 @@ declare export var numberValue2: number; " `; -exports[`ES6_Named1.js 1`] = ` +exports[`ES6_Named1.js-flow 1`] = ` "/** * @providesModule ES6_Named1 * @flow @@ -468,7 +468,7 @@ declare export var varDeclNumber2: number; " `; -exports[`ES6_Named2.js 1`] = ` +exports[`ES6_Named2.js-flow 1`] = ` "/** * @providesModule ES6_Named2 * @flow @@ -511,7 +511,7 @@ declare export var varDeclNumber4: number; " `; -exports[`ProvidesModuleA.js 1`] = ` +exports[`ProvidesModuleA.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -536,7 +536,7 @@ exports.stringValue = \\"str\\"; " `; -exports[`ProvidesModuleCJSDefault.js 1`] = ` +exports[`ProvidesModuleCJSDefault.js-flow 1`] = ` "/** * @providesModule CJSDefault * @flow @@ -557,7 +557,7 @@ module.exports = { " `; -exports[`ProvidesModuleD.js 1`] = ` +exports[`ProvidesModuleD.js-flow 1`] = ` "/** * @providesModule D * @flow @@ -570,7 +570,7 @@ exports[`ProvidesModuleD.js 1`] = ` " `; -exports[`ProvidesModuleES6Default.js 1`] = ` +exports[`ProvidesModuleES6Default.js-flow 1`] = ` "/** * @providesModule ES6Default * @flow @@ -595,14 +595,14 @@ export default { " `; -exports[`SideEffects.js 1`] = ` +exports[`SideEffects.js-flow 1`] = ` "/* @flow */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @flow */ " `; -exports[`es6modules.js 1`] = ` +exports[`es6modules.js-flow 1`] = ` "/* @flow */ // ===================== // diff --git a/tests/flow/declare_fun/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_fun/__snapshots__/jsfmt.spec.js.snap index aca6289e3..2e090f32b 100644 --- a/tests/flow/declare_fun/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_fun/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "declare function foo(x: number): string; declare function foo(x: string): number; declare function foo(x: X): X; diff --git a/tests/flow/declare_module_exports/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_module_exports/__snapshots__/jsfmt.spec.js.snap index 2d2bdd266..24d21f72d 100644 --- a/tests/flow/declare_module_exports/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_module_exports/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow import declare_module_exports from \\"declare_module_exports\\"; diff --git a/tests/flow/declare_module_exports/flow-typed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_module_exports/flow-typed/__snapshots__/jsfmt.spec.js.snap index b10873f2c..1a67fb254 100644 --- a/tests/flow/declare_module_exports/flow-typed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_module_exports/flow-typed/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libs.js 1`] = ` +exports[`libs.js-flow 1`] = ` "declare module \\"declare_module_exports\\" { declare module.exports: number; } diff --git a/tests/flow/declare_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_type/__snapshots__/jsfmt.spec.js.snap index db1fd1fb5..b4d3af700 100644 --- a/tests/flow/declare_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_type/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`import_declare_type.js 1`] = ` +exports[`import_declare_type.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap index c9893e33f..799b25fed 100644 --- a/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/declare_type/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`declare_module_type_alias.js 1`] = ` +exports[`declare_module_type_alias.js-flow 1`] = ` "/** * @flow */ @@ -29,7 +29,7 @@ declare type Foo = string; " `; -exports[`declare_type_exports.js 1`] = ` +exports[`declare_type_exports.js-flow 1`] = ` "/* @flow */ declare module 'foo' { diff --git a/tests/flow/def_site_variance/__snapshots__/jsfmt.spec.js.snap b/tests/flow/def_site_variance/__snapshots__/jsfmt.spec.js.snap index 954911aa7..cfdf170c6 100644 --- a/tests/flow/def_site_variance/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/def_site_variance/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class Variance<+Out,-In> { foo(x: Out): Out { return x; } bar(y: In): In { return y; } diff --git a/tests/flow/demo/1/__snapshots__/jsfmt.spec.js.snap b/tests/flow/demo/1/__snapshots__/jsfmt.spec.js.snap index 1ced68b34..4bf63d117 100644 --- a/tests/flow/demo/1/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/demo/1/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`f.js 1`] = ` +exports[`f.js-flow 1`] = ` "/* demo */ function f(x) { return 42/x; } diff --git a/tests/flow/demo/2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/demo/2/__snapshots__/jsfmt.spec.js.snap index db4f0b420..0a1fcd025 100644 --- a/tests/flow/demo/2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/demo/2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/* @providesModule Demo */ class A { @@ -49,7 +49,7 @@ module.exports = A; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "var A = require('Demo'); var z = new A(\\"42\\").getX(); diff --git a/tests/flow/deps/__snapshots__/jsfmt.spec.js.snap b/tests/flow/deps/__snapshots__/jsfmt.spec.js.snap index eb15a925a..78269c721 100644 --- a/tests/flow/deps/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/deps/__snapshots__/jsfmt.spec.js.snap @@ -1,20 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "require('./C'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ require(\\"./C\\"); " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "require('./C'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ require(\\"./C\\"); " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "require('./D'); require('./E'); require('./F'); @@ -27,42 +27,42 @@ require(\\"./G\\"); " `; -exports[`D.js 1`] = ` +exports[`D.js-flow 1`] = ` "require('./I'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ require(\\"./I\\"); " `; -exports[`E.js 1`] = ` +exports[`E.js-flow 1`] = ` "require('./I'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ require(\\"./I\\"); " `; -exports[`F.js 1`] = ` +exports[`F.js-flow 1`] = ` "// empty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // empty " `; -exports[`G.js 1`] = ` +exports[`G.js-flow 1`] = ` "require('./H'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ require(\\"./H\\"); " `; -exports[`H.js 1`] = ` +exports[`H.js-flow 1`] = ` "// empty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // empty " `; -exports[`I.js 1`] = ` +exports[`I.js-flow 1`] = ` "require('./A'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ require(\\"./A\\"); diff --git a/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap index 243d6408a..340f22b5a 100644 --- a/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/destructuring/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array_rest.js 1`] = ` +exports[`array_rest.js-flow 1`] = ` "let xs = [0, \\"\\", true]; let [a, ...ys] = xs; let [b, ...zs] = ys; @@ -29,7 +29,7 @@ let [...e] = 0; " `; -exports[`computed.js 1`] = ` +exports[`computed.js-flow 1`] = ` "var { [\\"key\\"]: val1 } = { key: \\"val\\" }; (val1: void); // error: string ~> void @@ -52,7 +52,7 @@ var { [\\"key\\"]: val3, ...spread } = { key: \\"val\\" }; " `; -exports[`defaults.js 1`] = ` +exports[`defaults.js-flow 1`] = ` "/* @flow */ function obj_prop_fun({p:{q=0}={q:true}}={p:{q:\\"\\"}}) { @@ -225,7 +225,7 @@ function default_expr_scope({ a, b = a }) {} " `; -exports[`destructuring.js 1`] = ` +exports[`destructuring.js-flow 1`] = ` "declare var a:string; declare var b:string; declare var c:string; @@ -372,7 +372,7 @@ var cp2_err: string = others.childprop2; // Error: number ~> string " `; -exports[`destructuring_param.js 1`] = ` +exports[`destructuring_param.js-flow 1`] = ` "function f(a, { b }) { return a + b; } @@ -403,7 +403,7 @@ function f(a, { b }) { " `; -exports[`eager.js 1`] = ` +exports[`eager.js-flow 1`] = ` "var x; ({x} = null); // error, property \`x\` can not be accessed on \`null\` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -412,7 +412,7 @@ var x; " `; -exports[`poly.js 1`] = ` +exports[`poly.js-flow 1`] = ` "// @flow function obj_pattern({ prop } : { prop: X }) {} // prop: X @@ -485,7 +485,7 @@ function arr_rest_pattern([_, ...a]: ArrRest) { " `; -exports[`rec.js 1`] = ` +exports[`rec.js-flow 1`] = ` "// @flow // Make sure that destructuring doesn't cause infinite loops when combined with @@ -530,7 +530,7 @@ var { x: o } = o; " `; -exports[`string_lit.js 1`] = ` +exports[`string_lit.js-flow 1`] = ` "var { \\"key\\": val } = { key: \\"val\\" }; (val: void); // error: string ~> void @@ -545,7 +545,7 @@ var { \\"with-dash\\": with_dash } = { \\"with-dash\\": \\"motivating example\\" " `; -exports[`unannotated.js 1`] = ` +exports[`unannotated.js-flow 1`] = ` "// @flow var { x } = { diff --git a/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap index e73ef3f1e..6ea027bf6 100644 --- a/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/dictionary/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`any.js 1`] = ` +exports[`any.js-flow 1`] = ` "/* @flow */ const dict: {[key: string]: number} = {} @@ -15,7 +15,7 @@ const val: string = dict[k]; // error: number incompatible with string " `; -exports[`compatible.js 1`] = ` +exports[`compatible.js-flow 1`] = ` "/* @flow */ function foo0(x: Array<{[key: string]: mixed}>): Array<{[key: string]: mixed}> { @@ -52,7 +52,7 @@ function foo2( " `; -exports[`dictionary.js 1`] = ` +exports[`dictionary.js-flow 1`] = ` "/* Dictionary types are object types that include an indexer, which specifies a * key type and a value type. The presence of an indexer makes the object type * unsealed, but all added properties must be consistent with the indexer @@ -652,7 +652,7 @@ function subtype_optional_c_to_dict(x: { p?: C }): { [k: string]: B } { " `; -exports[`incompatible.js 1`] = ` +exports[`incompatible.js-flow 1`] = ` "/* @flow */ var x : {[key: string]: string} = {}; @@ -775,7 +775,7 @@ function foo8(x: { [key: string]: number }) { " `; -exports[`issue-1745.js 1`] = ` +exports[`issue-1745.js-flow 1`] = ` "/* @flow */ class A { @@ -830,7 +830,7 @@ class B { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type Params = {count: number; [name: string]: string}; type QueryFunction = (params: Params) => string; @@ -855,7 +855,7 @@ module.exports = o; " `; -exports[`test_client.js 1`] = ` +exports[`test_client.js-flow 1`] = ` "var o = require('./test'); o.foo = function (params) { diff --git a/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap b/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap index 845c76bfb..43847dcc0 100644 --- a/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/disjoint-union-perf/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ast.js 1`] = ` +exports[`ast.js-flow 1`] = ` "/** * @flow */ @@ -163,7 +163,7 @@ export type TypedNode = " `; -exports[`emit.js 1`] = ` +exports[`emit.js-flow 1`] = ` "/** * @flow */ @@ -296,7 +296,7 @@ export function emitExpression(node: TypedNode): t.Expression { " `; -exports[`jsAst.js 1`] = ` +exports[`jsAst.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/docblock_flow/__snapshots__/jsfmt.spec.js.snap b/tests/flow/docblock_flow/__snapshots__/jsfmt.spec.js.snap index c8eff340b..dd06d6d59 100644 --- a/tests/flow/docblock_flow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/docblock_flow/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`license_with_flow.js 1`] = ` +exports[`license_with_flow.js-flow 1`] = ` "/* Copyright example */ /* @flow */ @@ -13,7 +13,7 @@ exports[`license_with_flow.js 1`] = ` " `; -exports[`max_header_tokens.js 1`] = ` +exports[`max_header_tokens.js-flow 1`] = ` "/* @flow */ /* second token */ /* third token */ @@ -34,7 +34,7 @@ exports[`max_header_tokens.js 1`] = ` " `; -exports[`multiple_flows_1.js 1`] = ` +exports[`multiple_flows_1.js-flow 1`] = ` "/* @flow */ /* @flow */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -43,7 +43,7 @@ exports[`multiple_flows_1.js 1`] = ` " `; -exports[`multiple_flows_2.js 1`] = ` +exports[`multiple_flows_2.js-flow 1`] = ` "/** * @flow * @noflow @@ -56,7 +56,7 @@ exports[`multiple_flows_2.js 1`] = ` " `; -exports[`multiple_providesModule_1.js 1`] = ` +exports[`multiple_providesModule_1.js-flow 1`] = ` "/** * @providesModule Foo * @providesModule Bar @@ -71,7 +71,7 @@ exports[`multiple_providesModule_1.js 1`] = ` " `; -exports[`multiple_providesModule_2.js 1`] = ` +exports[`multiple_providesModule_2.js-flow 1`] = ` "/** * @providesModule Foo * @flow @@ -90,7 +90,7 @@ exports[`multiple_providesModule_2.js 1`] = ` " `; -exports[`use_strict_with_flow.js 1`] = ` +exports[`use_strict_with_flow.js-flow 1`] = ` "\\"use strict\\"; /* @flow */ @@ -103,7 +103,7 @@ exports[`use_strict_with_flow.js 1`] = ` " `; -exports[`with_flow.js 1`] = ` +exports[`with_flow.js-flow 1`] = ` "/* @flow */ (\\"\\": void); // error @@ -114,7 +114,7 @@ exports[`with_flow.js 1`] = ` " `; -exports[`without_flow.js 1`] = ` +exports[`without_flow.js-flow 1`] = ` "/* some other comment */ (\\"\\": void); // no error diff --git a/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap b/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap index 8376fc12f..aee09db09 100644 --- a/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/dom/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`CanvasRenderingContext2D.js 1`] = ` +exports[`CanvasRenderingContext2D.js-flow 1`] = ` "// @flow let tests = [ @@ -31,7 +31,7 @@ let tests = [ " `; -exports[`CustomEvent.js 1`] = ` +exports[`CustomEvent.js-flow 1`] = ` "// @flow let tests = [ @@ -54,7 +54,7 @@ let tests = [ " `; -exports[`Document.js 1`] = ` +exports[`Document.js-flow 1`] = ` "// @flow let tests = [ @@ -81,7 +81,7 @@ let tests = [ " `; -exports[`Element.js 1`] = ` +exports[`Element.js-flow 1`] = ` "// @flow let tests = [ @@ -122,7 +122,7 @@ let tests = [ " `; -exports[`HTMLCanvasElement.js 1`] = ` +exports[`HTMLCanvasElement.js-flow 1`] = ` "// @flow let tests = [ @@ -143,7 +143,7 @@ let tests = [ " `; -exports[`HTMLElement.js 1`] = ` +exports[`HTMLElement.js-flow 1`] = ` "// @flow let tests = [ @@ -184,7 +184,7 @@ let tests = [ " `; -exports[`HTMLInputElement.js 1`] = ` +exports[`HTMLInputElement.js-flow 1`] = ` "// @flow let tests = [ @@ -213,7 +213,7 @@ let tests = [ " `; -exports[`URL.js 1`] = ` +exports[`URL.js-flow 1`] = ` "/* @flow */ const a = new URL('http://flowtype.org/'); // correct @@ -258,7 +258,7 @@ const r: string = c.username; // correct " `; -exports[`eventtarget.js 1`] = ` +exports[`eventtarget.js-flow 1`] = ` "// @flow let listener: EventListener = function (event: Event) :void {}; @@ -313,7 +313,7 @@ let tests = [ " `; -exports[`path2d.js 1`] = ` +exports[`path2d.js-flow 1`] = ` "// @flow let tests = [ @@ -340,7 +340,7 @@ let tests = [ " `; -exports[`registerElement.js 1`] = ` +exports[`registerElement.js-flow 1`] = ` "// @flow let tests = [ @@ -460,7 +460,7 @@ let tests = [ " `; -exports[`traversal.js 1`] = ` +exports[`traversal.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/dump-types/__snapshots__/jsfmt.spec.js.snap b/tests/flow/dump-types/__snapshots__/jsfmt.spec.js.snap index 5b3ab1fe6..7df644610 100644 --- a/tests/flow/dump-types/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/dump-types/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`import.js 1`] = ` +exports[`import.js-flow 1`] = ` "// @flow var num = 42; function bar() { } @@ -15,7 +15,7 @@ module.exports = num; " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow var num = require('./import'); function foo(x) { } diff --git a/tests/flow/duplicate_methods/__snapshots__/jsfmt.spec.js.snap b/tests/flow/duplicate_methods/__snapshots__/jsfmt.spec.js.snap index 9d10f5e3e..9d68311dc 100644 --- a/tests/flow/duplicate_methods/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/duplicate_methods/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class C1 { m() { } m() { } diff --git a/tests/flow/encaps/__snapshots__/jsfmt.spec.js.snap b/tests/flow/encaps/__snapshots__/jsfmt.spec.js.snap index 70121e3e6..637feff3c 100644 --- a/tests/flow/encaps/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/encaps/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`encaps.js 1`] = ` +exports[`encaps.js-flow 1`] = ` "class A { } var a = new A(); var s1 = \`l\${a.x}r\`; // error: no prop x in A diff --git a/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap b/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap index 31ad91ff3..37ab5afed 100644 --- a/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/enumerror/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`enumerror.js 1`] = ` +exports[`enumerror.js-flow 1`] = ` "/** @flow */ function isActive(ad: {state: $Keys<{ diff --git a/tests/flow/equals/__snapshots__/jsfmt.spec.js.snap b/tests/flow/equals/__snapshots__/jsfmt.spec.js.snap index b792f8646..e938785d0 100644 --- a/tests/flow/equals/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/equals/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`equals.js 1`] = ` +exports[`equals.js-flow 1`] = ` "/* @flow */ (1 == 1); diff --git a/tests/flow/error_messages/__snapshots__/jsfmt.spec.js.snap b/tests/flow/error_messages/__snapshots__/jsfmt.spec.js.snap index e542499ac..36db7b59d 100644 --- a/tests/flow/error_messages/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/error_messages/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`errors.js 1`] = ` +exports[`errors.js-flow 1`] = ` "if (typeof define === 'function' && define.amd) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (typeof define === \\"function\\" && define.amd) { diff --git a/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap index 867bc7c31..78f6a6c1e 100644 --- a/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/es6modules/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/* @flow */ exports.numberValue = 42; @@ -11,14 +11,14 @@ exports.numberValue = 42; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "/* @flow */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @flow */ " `; -exports[`CommonJS_Clobbering_Class.js 1`] = ` +exports[`CommonJS_Clobbering_Class.js-flow 1`] = ` "/** * @providesModule CommonJS_Clobbering_Class * @flow @@ -75,7 +75,7 @@ module.exports = Test; " `; -exports[`CommonJS_Clobbering_Frozen.js 1`] = ` +exports[`CommonJS_Clobbering_Frozen.js-flow 1`] = ` "/** * @providesModule CommonJS_Clobbering_Frozen * @flow @@ -96,7 +96,7 @@ module.exports = Object.freeze({ " `; -exports[`CommonJS_Clobbering_Lit.js 1`] = ` +exports[`CommonJS_Clobbering_Lit.js-flow 1`] = ` "/** * @providesModule CommonJS_Clobbering_Lit * @flow @@ -125,7 +125,7 @@ module.exports = { " `; -exports[`CommonJS_Named.js 1`] = ` +exports[`CommonJS_Named.js-flow 1`] = ` "/** * @providesModule CommonJS_Named * @flow @@ -150,7 +150,7 @@ exports.numberValue5 = 5; " `; -exports[`ES6_Default_AnonClass1.js 1`] = ` +exports[`ES6_Default_AnonClass1.js-flow 1`] = ` "/** * @providesModule ES6_Default_AnonClass1 * @flow @@ -171,7 +171,7 @@ export default class { " `; -exports[`ES6_Default_AnonClass2.js 1`] = ` +exports[`ES6_Default_AnonClass2.js-flow 1`] = ` "/** * @providesModule ES6_Default_AnonClass2 * @flow @@ -192,7 +192,7 @@ export default class { " `; -exports[`ES6_Default_AnonFunction1.js 1`] = ` +exports[`ES6_Default_AnonFunction1.js-flow 1`] = ` "/** * @providesModule ES6_Default_AnonFunction1 * @flow @@ -211,7 +211,7 @@ export default function(): number { " `; -exports[`ES6_Default_AnonFunction2.js 1`] = ` +exports[`ES6_Default_AnonFunction2.js-flow 1`] = ` "/** * @providesModule ES6_Default_AnonFunction2 * @flow @@ -230,7 +230,7 @@ export default function(): number { " `; -exports[`ES6_Default_NamedClass1.js 1`] = ` +exports[`ES6_Default_NamedClass1.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedClass1 * @flow @@ -261,7 +261,7 @@ new Foo(); " `; -exports[`ES6_Default_NamedClass2.js 1`] = ` +exports[`ES6_Default_NamedClass2.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedClass2 * @flow @@ -282,7 +282,7 @@ export default class Foo { " `; -exports[`ES6_Default_NamedFunction1.js 1`] = ` +exports[`ES6_Default_NamedFunction1.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedFunction1 * @flow @@ -301,7 +301,7 @@ export default function foo(): number { " `; -exports[`ES6_Default_NamedFunction2.js 1`] = ` +exports[`ES6_Default_NamedFunction2.js-flow 1`] = ` "/** * @providesModule ES6_Default_NamedFunction2 * @flow @@ -320,7 +320,7 @@ export default function foo(): number { " `; -exports[`ES6_DefaultAndNamed.js 1`] = ` +exports[`ES6_DefaultAndNamed.js-flow 1`] = ` "/* @flow */ export default 42; @@ -333,7 +333,7 @@ export var str = \\"asdf\\"; " `; -exports[`ES6_ExportAllFrom_Intermediary1.js 1`] = ` +exports[`ES6_ExportAllFrom_Intermediary1.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Intermediary1 * @flow @@ -350,7 +350,7 @@ export * from \\"ES6_ExportAllFrom_Source1\\"; " `; -exports[`ES6_ExportAllFrom_Intermediary2.js 1`] = ` +exports[`ES6_ExportAllFrom_Intermediary2.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Intermediary2 * @flow @@ -367,7 +367,7 @@ export * from \\"ES6_ExportAllFrom_Source2\\"; " `; -exports[`ES6_ExportAllFrom_Source1.js 1`] = ` +exports[`ES6_ExportAllFrom_Source1.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Source1 * @flow @@ -384,7 +384,7 @@ export var numberValue1 = 1; " `; -exports[`ES6_ExportAllFrom_Source2.js 1`] = ` +exports[`ES6_ExportAllFrom_Source2.js-flow 1`] = ` "/** * @providesModule ES6_ExportAllFrom_Source2 * @flow @@ -401,7 +401,7 @@ export var numberValue2 = 1; " `; -exports[`ES6_ExportAllFromMulti.js 1`] = ` +exports[`ES6_ExportAllFromMulti.js-flow 1`] = ` "// @flow export * from \\"./ES6_ExportAllFrom_Source1\\"; @@ -414,7 +414,7 @@ export * from \\"./ES6_ExportAllFrom_Source2\\"; " `; -exports[`ES6_ExportFrom_Intermediary1.js 1`] = ` +exports[`ES6_ExportFrom_Intermediary1.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Intermediary1 * @flow @@ -437,7 +437,7 @@ export { " `; -exports[`ES6_ExportFrom_Intermediary2.js 1`] = ` +exports[`ES6_ExportFrom_Intermediary2.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Intermediary2 * @flow @@ -460,7 +460,7 @@ export { " `; -exports[`ES6_ExportFrom_Source1.js 1`] = ` +exports[`ES6_ExportFrom_Source1.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Source1 * @flow @@ -477,7 +477,7 @@ export var numberValue1 = 1, numberValue2 = 2; " `; -exports[`ES6_ExportFrom_Source2.js 1`] = ` +exports[`ES6_ExportFrom_Source2.js-flow 1`] = ` "/** * @providesModule ES6_ExportFrom_Source2 * @flow @@ -494,7 +494,7 @@ export var numberValue1 = 1, numberValue2 = 2; " `; -exports[`ES6_Named1.js 1`] = ` +exports[`ES6_Named1.js-flow 1`] = ` "/** * @providesModule ES6_Named1 * @flow @@ -549,7 +549,7 @@ export var [destructuredArrNumber] = [1]; " `; -exports[`ES6_Named2.js 1`] = ` +exports[`ES6_Named2.js-flow 1`] = ` "/** * @providesModule ES6_Named2 * @flow @@ -600,7 +600,7 @@ export var [destructuredArrNumber2] = [1]; " `; -exports[`ExportType.js 1`] = ` +exports[`ExportType.js-flow 1`] = ` "// @flow export type typeAlias = number; @@ -611,7 +611,7 @@ export type typeAlias = number; " `; -exports[`ProvidesModuleA.js 1`] = ` +exports[`ProvidesModuleA.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -636,7 +636,7 @@ exports.stringValue = \\"str\\"; " `; -exports[`ProvidesModuleCJSDefault.js 1`] = ` +exports[`ProvidesModuleCJSDefault.js-flow 1`] = ` "/** * @providesModule CJSDefault * @flow @@ -657,7 +657,7 @@ module.exports = { " `; -exports[`ProvidesModuleD.js 1`] = ` +exports[`ProvidesModuleD.js-flow 1`] = ` "/** * @providesModule D * @flow @@ -670,7 +670,7 @@ exports[`ProvidesModuleD.js 1`] = ` " `; -exports[`ProvidesModuleES6Default.js 1`] = ` +exports[`ProvidesModuleES6Default.js-flow 1`] = ` "/** * @providesModule ES6Default * @flow @@ -695,14 +695,14 @@ export default { " `; -exports[`SideEffects.js 1`] = ` +exports[`SideEffects.js-flow 1`] = ` "/* @flow */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @flow */ " `; -exports[`es6modules.js 1`] = ` +exports[`es6modules.js-flow 1`] = ` "/* @flow */ // ===================== // @@ -1299,7 +1299,7 @@ import { typeAlias } from \\"./ExportType\\"; // Error: Cannot vanilla-import a " `; -exports[`test_imports_are_frozen.js 1`] = ` +exports[`test_imports_are_frozen.js-flow 1`] = ` "/* @flow */ // diff --git a/tests/flow/es_declare_module/__snapshots__/jsfmt.spec.js.snap b/tests/flow/es_declare_module/__snapshots__/jsfmt.spec.js.snap index 99e787605..0e861c721 100644 --- a/tests/flow/es_declare_module/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/es_declare_module/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`es_declare_module.js 1`] = ` +exports[`es_declare_module.js-flow 1`] = ` "// @flow import {num1, str1} from \\"CJS_Named\\"; diff --git a/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap index 956a0dc95..82fce7d14 100644 --- a/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/es_declare_module/flow-typed/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`declares.js 1`] = ` +exports[`declares.js-flow 1`] = ` "declare module \\"CJS_Named\\" { declare var num1: number; declare var str1: string; diff --git a/tests/flow/esproposal_export_star_as.enable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/esproposal_export_star_as.enable/__snapshots__/jsfmt.spec.js.snap index e600eff14..c835e518d 100644 --- a/tests/flow/esproposal_export_star_as.enable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/esproposal_export_star_as.enable/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dest.js 1`] = ` +exports[`dest.js-flow 1`] = ` "// @flow import {source} from \\"./test\\"; @@ -23,7 +23,7 @@ var d: number = source.str; // Error: num ~> string " `; -exports[`source.js 1`] = ` +exports[`source.js-flow 1`] = ` "// @flow export var str = 'asdf'; diff --git a/tests/flow/esproposal_export_star_as.ignore/__snapshots__/jsfmt.spec.js.snap b/tests/flow/esproposal_export_star_as.ignore/__snapshots__/jsfmt.spec.js.snap index 4c408ba98..5e14fafc2 100644 --- a/tests/flow/esproposal_export_star_as.ignore/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/esproposal_export_star_as.ignore/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dest.js 1`] = ` +exports[`dest.js-flow 1`] = ` "// @flow import {source} from \\"./test\\"; @@ -23,7 +23,7 @@ var d: number = source.str; // Ignored error: num ~> string " `; -exports[`source.js 1`] = ` +exports[`source.js-flow 1`] = ` "// @flow export var str = 'asdf'; diff --git a/tests/flow/export_default/__snapshots__/jsfmt.spec.js.snap b/tests/flow/export_default/__snapshots__/jsfmt.spec.js.snap index 37a848cf5..126b98eab 100644 --- a/tests/flow/export_default/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/export_default/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`P.js 1`] = ` +exports[`P.js-flow 1`] = ` "module.exports = require('M'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = require(\\"M\\"); " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var M = require('M'); var N = require('N'); N.x = M(N.x); diff --git a/tests/flow/export_default/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/export_default/lib/__snapshots__/jsfmt.spec.js.snap index dca6b58f3..42c98b7d0 100644 --- a/tests/flow/export_default/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/export_default/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare module M { declare function exports(x:string): string; } diff --git a/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap index 83f6f2094..97c6d733d 100644 --- a/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/export_type/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cjs_with_types.js 1`] = ` +exports[`cjs_with_types.js-flow 1`] = ` "/* @flow */ export type talias4 = number; @@ -17,7 +17,7 @@ module.exports = {}; " `; -exports[`importer.js 1`] = ` +exports[`importer.js-flow 1`] = ` "/* @flow */ import type { @@ -86,7 +86,7 @@ var n: IFoo2 = { prop: 42 }; // Error: {prop:number} ~> {prop:string} " `; -exports[`types_only.js 1`] = ` +exports[`types_only.js-flow 1`] = ` "/* @flow */ export type inlinedType1 = number; @@ -121,7 +121,7 @@ export interface IFoo { prop: number } " `; -exports[`types_only2.js 1`] = ` +exports[`types_only2.js-flow 1`] = ` "/* @flow */ export type talias1 = number; diff --git a/tests/flow/extensions/__snapshots__/jsfmt.spec.js.snap b/tests/flow/extensions/__snapshots__/jsfmt.spec.js.snap index 4067aab70..c5b07745f 100644 --- a/tests/flow/extensions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/extensions/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var imp = require('./bar'); imp(1337); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/facebook_fbt_none/__snapshots__/jsfmt.spec.js.snap b/tests/flow/facebook_fbt_none/__snapshots__/jsfmt.spec.js.snap index ad5b6a5fa..a8c6a3693 100644 --- a/tests/flow/facebook_fbt_none/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/facebook_fbt_none/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow var React = require('react'); (: React.Element<*>); diff --git a/tests/flow/facebook_fbt_some/__snapshots__/jsfmt.spec.js.snap b/tests/flow/facebook_fbt_some/__snapshots__/jsfmt.spec.js.snap index 69430b2de..4fab1dd94 100644 --- a/tests/flow/facebook_fbt_some/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/facebook_fbt_some/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow (: number); diff --git a/tests/flow/facebook_fbt_some/flow-typed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/facebook_fbt_some/flow-typed/__snapshots__/jsfmt.spec.js.snap index d035b074a..4041fb7e8 100644 --- a/tests/flow/facebook_fbt_some/flow-typed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/facebook_fbt_some/flow-typed/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`fbt.js 1`] = ` +exports[`fbt.js-flow 1`] = ` "type Fbt = number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ type Fbt = number; diff --git a/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap b/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap index e85d29006..ac00cda8a 100644 --- a/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/facebookisms/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Bar.js 1`] = ` +exports[`Bar.js-flow 1`] = ` "var Bar = { x: 0 }; module.exports = Bar; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ module.exports = Bar; " `; -exports[`copyProperties.js 1`] = ` +exports[`copyProperties.js-flow 1`] = ` "// @flow let tests = [ @@ -92,7 +92,7 @@ let tests = [ " `; -exports[`invariant.js 1`] = ` +exports[`invariant.js-flow 1`] = ` "/* @flow */ let tests = [ @@ -125,7 +125,7 @@ let tests = [ " `; -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare module \\"copyProperties\\" { declare var exports: Object$Assign; } @@ -150,7 +150,7 @@ declare module \\"mixin\\" { " `; -exports[`mergeInto.js 1`] = ` +exports[`mergeInto.js-flow 1`] = ` "// @flow let tests = [ @@ -223,7 +223,7 @@ let tests = [ " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var Bar = require('./Bar'); var mixin = require('mixin'); diff --git a/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap b/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap index 5b90de60a..504f8f400 100644 --- a/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/fetch/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`fetch.js 1`] = ` +exports[`fetch.js-flow 1`] = ` "/* @flow */ // most of the details are tested in the separate file @@ -53,7 +53,7 @@ const d: Promise = fetch(\\"image.png\\"); // incorrect " `; -exports[`headers.js 1`] = ` +exports[`headers.js-flow 1`] = ` "/* @flow */ const a = new Headers(\\"'Content-Type': 'image/jpeg'\\"); // not correct @@ -114,7 +114,7 @@ e.getAll(\\"content-type\\").forEach((v: string) => {}); // correct " `; -exports[`request.js 1`] = ` +exports[`request.js-flow 1`] = ` "/* @flow */ const a: Request = new Request(); // incorrect const b: Request = new Request('http://example.org'); // correct @@ -221,7 +221,7 @@ h.arrayBuffer().then((ab: Buffer) => ab); // incorrect " `; -exports[`response.js 1`] = ` +exports[`response.js-flow 1`] = ` "/* @flow */ const a: Response = new Response(); // correct const b: Response = new Response(new Blob()); // correct @@ -318,7 +318,7 @@ h.arrayBuffer().then((ab: Buffer) => ab); // incorrect " `; -exports[`urlsearchparams.js 1`] = ` +exports[`urlsearchparams.js-flow 1`] = ` "/* @flow */ const a = new URLSearchParams(\\"key1=value1\\"); // correct diff --git a/tests/flow/find-module/__snapshots__/jsfmt.spec.js.snap b/tests/flow/find-module/__snapshots__/jsfmt.spec.js.snap index 787a75633..2d5909fac 100644 --- a/tests/flow/find-module/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/find-module/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`req.js 1`] = ` +exports[`req.js-flow 1`] = ` "module.exports = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = 0; " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var x = require('./req'); (x: string); diff --git a/tests/flow/fixpoint/__snapshots__/jsfmt.spec.js.snap b/tests/flow/fixpoint/__snapshots__/jsfmt.spec.js.snap index 24322eb00..af7dc2cce 100644 --- a/tests/flow/fixpoint/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/fixpoint/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Fun.js 1`] = ` +exports[`Fun.js-flow 1`] = ` " /* @providesModule Fun */ @@ -72,7 +72,7 @@ module.exports = { fn: fix }; " `; -exports[`Ycombinator.js 1`] = ` +exports[`Ycombinator.js-flow 1`] = ` " /* @providesModule Ycombinator */ diff --git a/tests/flow/flow_ast.template_strings/__snapshots__/jsfmt.spec.js.snap b/tests/flow/flow_ast.template_strings/__snapshots__/jsfmt.spec.js.snap index 1800433a0..e72f825d4 100644 --- a/tests/flow/flow_ast.template_strings/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/flow_ast.template_strings/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "a\`foo \${bar} baz\` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a\`foo \${bar} baz\`; diff --git a/tests/flow/for/__snapshots__/jsfmt.spec.js.snap b/tests/flow/for/__snapshots__/jsfmt.spec.js.snap index aeffc471a..8b2b5e0d7 100644 --- a/tests/flow/for/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/for/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`abnormal.js 1`] = ` +exports[`abnormal.js-flow 1`] = ` "/* @flow */ function foo(x: boolean) { @@ -99,7 +99,7 @@ function corge(x: boolean) { " `; -exports[`abnormal_for_in.js 1`] = ` +exports[`abnormal_for_in.js-flow 1`] = ` "function foo(x: boolean) { var obj = { a: 1, b: 2}; for (var prop in obj) { @@ -188,7 +188,7 @@ function corge(x: boolean) { " `; -exports[`abnormal_for_of.js 1`] = ` +exports[`abnormal_for_of.js-flow 1`] = ` "function foo(x: boolean) { var arr = [1, 2, 3]; for (var elem of arr) { diff --git a/tests/flow/forof/__snapshots__/jsfmt.spec.js.snap b/tests/flow/forof/__snapshots__/jsfmt.spec.js.snap index 3bfba67c6..c4a6aad5b 100644 --- a/tests/flow/forof/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/forof/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`forof.js 1`] = ` +exports[`forof.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/function/__snapshots__/jsfmt.spec.js.snap b/tests/flow/function/__snapshots__/jsfmt.spec.js.snap index 89d3175a2..922c11931 100644 --- a/tests/flow/function/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/function/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`apply.js 1`] = ` +exports[`apply.js-flow 1`] = ` "function test(a: string, b: number): number { return this.length; // expect []/\\"\\" this } @@ -93,7 +93,7 @@ function test2(): number { " `; -exports[`bind.js 1`] = ` +exports[`bind.js-flow 1`] = ` "// @flow let tests = [ @@ -116,7 +116,7 @@ let tests = [ " `; -exports[`call.js 1`] = ` +exports[`call.js-flow 1`] = ` "// @flow function test(a: string, b: number): number { @@ -195,7 +195,7 @@ function test2(): number { " `; -exports[`function.js 1`] = ` +exports[`function.js-flow 1`] = ` "/** * @flow */ @@ -334,7 +334,7 @@ var e = (d.bind(1): Function)(); " `; -exports[`rest.js 1`] = ` +exports[`rest.js-flow 1`] = ` "/* regression tests */ function rest_array(...xs: Array): T { diff --git a/tests/flow/funrec/__snapshots__/jsfmt.spec.js.snap b/tests/flow/funrec/__snapshots__/jsfmt.spec.js.snap index 7838f34c7..1fccbc774 100644 --- a/tests/flow/funrec/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/funrec/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`funrec.js 1`] = ` +exports[`funrec.js-flow 1`] = ` "function bar(x) { return x; } function foo() { return function bound() { diff --git a/tests/flow/generators/__snapshots__/jsfmt.spec.js.snap b/tests/flow/generators/__snapshots__/jsfmt.spec.js.snap index 9c4322026..b25751484 100644 --- a/tests/flow/generators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/generators/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class.js 1`] = ` +exports[`class.js-flow 1`] = ` "class GeneratorExamples { *stmt_yield(): Generator { yield 0; // ok @@ -265,7 +265,7 @@ for (var x of examples.delegate_yield_iterable([])) { " `; -exports[`class_failure.js 1`] = ` +exports[`class_failure.js-flow 1`] = ` "// generalization of failure in class.js class GeneratorExamples { @@ -312,7 +312,7 @@ if (typeof infer_stmt_next === \\"undefined\\") { " `; -exports[`generators.js 1`] = ` +exports[`generators.js-flow 1`] = ` "function *stmt_yield(): Generator { yield 0; // ok yield \\"\\"; // error: string ~> number @@ -577,7 +577,7 @@ if (multiple_return_result.done) { " `; -exports[`return.js 1`] = ` +exports[`return.js-flow 1`] = ` "function test1(gen: Generator) { // You can pass whatever you like to return, it doesn't need to be related to // the Generator's return type @@ -624,7 +624,7 @@ if (refuse_return_result.done) { " `; -exports[`throw.js 1`] = ` +exports[`throw.js-flow 1`] = ` "function *catch_return() { try { yield 0; @@ -679,7 +679,7 @@ if (yield_return_value !== undefined) { " `; -exports[`variance.js 1`] = ` +exports[`variance.js-flow 1`] = ` "declare var g1: Generator; var g2: Generator = g1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/generics/__snapshots__/jsfmt.spec.js.snap b/tests/flow/generics/__snapshots__/jsfmt.spec.js.snap index 150136486..fdc35ebc8 100644 --- a/tests/flow/generics/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/generics/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`generics.js 1`] = ` +exports[`generics.js-flow 1`] = ` "class C { x:X; constructor(x:X) { this.x = x; } diff --git a/tests/flow/geolocation/__snapshots__/jsfmt.spec.js.snap b/tests/flow/geolocation/__snapshots__/jsfmt.spec.js.snap index 9d5354838..0e1ca7e31 100644 --- a/tests/flow/geolocation/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/geolocation/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "/* @flow */ var geolocation = new Geolocation(); diff --git a/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap index dd91c8110..d532ec2ba 100644 --- a/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-def/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`example.js 1`] = ` +exports[`example.js-flow 1`] = ` "/* @flow */ var lib = require('./library'); @@ -35,7 +35,7 @@ lib.bar(); " `; -exports[`imports.js 1`] = ` +exports[`imports.js-flow 1`] = ` "// @flow import thing from \\"./helpers/exports_default.js\\"; @@ -62,7 +62,7 @@ things; " `; -exports[`library.js 1`] = ` +exports[`library.js-flow 1`] = ` "/* @flow */ module.exports = { diff --git a/tests/flow/get-def/helpers/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-def/helpers/__snapshots__/jsfmt.spec.js.snap index 569ef7c49..8e65cd98d 100644 --- a/tests/flow/get-def/helpers/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-def/helpers/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`exports_default.js 1`] = ` +exports[`exports_default.js-flow 1`] = ` "// @flow const x = \\"foo\\"; @@ -15,7 +15,7 @@ export default x; " `; -exports[`exports_named.js 1`] = ` +exports[`exports_named.js-flow 1`] = ` "// @flow export const foo = \\"foo\\"; diff --git a/tests/flow/get-def2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-def2/__snapshots__/jsfmt.spec.js.snap index ac43726ae..b04c22ec5 100644 --- a/tests/flow/get-def2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-def2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Parent.js 1`] = ` +exports[`Parent.js-flow 1`] = ` "// @flow var ParentFoo = {foo: 'bar'}; @@ -13,7 +13,7 @@ module.exports = { ParentFoo }; " `; -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow var Parent = require('./Parent'); @@ -64,7 +64,7 @@ import type { Foo } from \\"./types\\"; " `; -exports[`override.js 1`] = ` +exports[`override.js-flow 1`] = ` "// @flow class C { @@ -95,7 +95,7 @@ class D extends C { " `; -exports[`react.js 1`] = ` +exports[`react.js-flow 1`] = ` "var React = require('react'); class C extends React.Component { @@ -122,7 +122,7 @@ let msg = \\"hello\\"; " `; -exports[`types.js 1`] = ` +exports[`types.js-flow 1`] = ` "// @flow export type Foo = {}; diff --git a/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap index 85d8aec26..48b2a5749 100644 --- a/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-def2/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`jsx.js 1`] = ` +exports[`jsx.js-flow 1`] = ` "declare var $React: $Exports<'react'>; // fake import type $JSXIntrinsic = Class<$React.Component>; diff --git a/tests/flow/get-imports-and-importers/__snapshots__/jsfmt.spec.js.snap b/tests/flow/get-imports-and-importers/__snapshots__/jsfmt.spec.js.snap index 09af19f6d..e07852f48 100644 --- a/tests/flow/get-imports-and-importers/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/get-imports-and-importers/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "// @flow ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // @flow " `; -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "/** * @flow * @providesModule b @@ -22,7 +22,7 @@ require(\\"./a\\"); " `; -exports[`c.js 1`] = ` +exports[`c.js-flow 1`] = ` "// @flow require('./a.js'); require('b'); diff --git a/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap b/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap index c9a2dafe2..4ea9a072d 100644 --- a/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/getters_and_setters_disabled/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`getters_and_setters.js 1`] = ` +exports[`getters_and_setters.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap b/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap index 4e80b1e76..7671b9ea6 100644 --- a/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class.js 1`] = ` +exports[`class.js-flow 1`] = ` "/** * @flow */ @@ -133,7 +133,7 @@ foo.propOverriddenWithSetter = 123; // Error number ~> string " `; -exports[`object.js 1`] = ` +exports[`object.js-flow 1`] = ` "/** * @flow */ @@ -273,7 +273,7 @@ var testExampleOrOrderOfGetterAndSetterReordered: number = obj.exampleOfOrderOfG " `; -exports[`react.js 1`] = ` +exports[`react.js-flow 1`] = ` "/** * @flow */ @@ -304,7 +304,7 @@ React.createClass({ " `; -exports[`variance.js 1`] = ` +exports[`variance.js-flow 1`] = ` "/* @flow */ class A {} diff --git a/tests/flow/haste_cycle/__snapshots__/jsfmt.spec.js.snap b/tests/flow/haste_cycle/__snapshots__/jsfmt.spec.js.snap index 48d61ff57..4a1b0d3f4 100644 --- a/tests/flow/haste_cycle/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/haste_cycle/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`API.js 1`] = ` +exports[`API.js-flow 1`] = ` "// @flow var OpenGraphObject = require('./models/OpenGraphObject.js'); diff --git a/tests/flow/haste_cycle/models/__snapshots__/jsfmt.spec.js.snap b/tests/flow/haste_cycle/models/__snapshots__/jsfmt.spec.js.snap index baff21cd7..049619632 100644 --- a/tests/flow/haste_cycle/models/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/haste_cycle/models/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`OpenGraphAction.js 1`] = ` +exports[`OpenGraphAction.js-flow 1`] = ` "// @flow var OpenGraphValueContainer = require('./OpenGraphValueContainer.js'); @@ -11,7 +11,7 @@ var OpenGraphValueContainer = require(\\"./OpenGraphValueContainer.js\\"); " `; -exports[`OpenGraphObject.js 1`] = ` +exports[`OpenGraphObject.js-flow 1`] = ` "// @flow var OpenGraphValueContainer = require('./OpenGraphValueContainer.js'); @@ -22,7 +22,7 @@ var OpenGraphValueContainer = require(\\"./OpenGraphValueContainer.js\\"); " `; -exports[`OpenGraphValueContainer.js 1`] = ` +exports[`OpenGraphValueContainer.js-flow 1`] = ` "// @flow var OpenGraphObject = require('./OpenGraphObject.js'); diff --git a/tests/flow/haste_dupe/__snapshots__/jsfmt.spec.js.snap b/tests/flow/haste_dupe/__snapshots__/jsfmt.spec.js.snap index 56742bec9..eb173014b 100644 --- a/tests/flow/haste_dupe/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/haste_dupe/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dupe1.js 1`] = ` +exports[`dupe1.js-flow 1`] = ` "/** * Dupe provider 1/2 * @providesModule Dupe @@ -17,7 +17,7 @@ module.exports = \\"dupe1\\"; " `; -exports[`dupe2.js 1`] = ` +exports[`dupe2.js-flow 1`] = ` "/** * Dupe provider 2/2 * @providesModule Dupe @@ -34,7 +34,7 @@ module.exports = \\"dupe2\\"; " `; -exports[`requires_dupe.js 1`] = ` +exports[`requires_dupe.js-flow 1`] = ` "/** * depends on doubly-provided module * @flow diff --git a/tests/flow/ignore_package/__snapshots__/jsfmt.spec.js.snap b/tests/flow/ignore_package/__snapshots__/jsfmt.spec.js.snap index 8db463bf1..969f9b1f6 100644 --- a/tests/flow/ignore_package/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/ignore_package/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "/** @flow */ /* this require routes to nothing, because our node_modules/underscore directory diff --git a/tests/flow/immutable_methods/__snapshots__/jsfmt.spec.js.snap b/tests/flow/immutable_methods/__snapshots__/jsfmt.spec.js.snap index c2f793b90..1725ecb52 100644 --- a/tests/flow/immutable_methods/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/immutable_methods/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class A { foo(): A { return this; } } diff --git a/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap index 657b49352..82cdcfce2 100644 --- a/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/import_type/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ExportCJSDefault_Class.js 1`] = ` +exports[`ExportCJSDefault_Class.js-flow 1`] = ` "/** * @flow */ @@ -31,7 +31,7 @@ module.exports = ClassFoo3; " `; -exports[`ExportCJSNamed_Class.js 1`] = ` +exports[`ExportCJSNamed_Class.js-flow 1`] = ` "/** * @flow */ @@ -82,7 +82,7 @@ exports.foo5Inst = new ClassFoo5(); " `; -exports[`ExportDefault_Class.js 1`] = ` +exports[`ExportDefault_Class.js-flow 1`] = ` "/** * @flow */ @@ -109,7 +109,7 @@ export var foo1Inst = new ClassFoo1(); " `; -exports[`ExportNamed_Alias.js 1`] = ` +exports[`ExportNamed_Alias.js-flow 1`] = ` "/** * @flow */ @@ -140,7 +140,7 @@ export function givesAFoo3Obj(): AliasFoo3 { " `; -exports[`ExportNamed_Class.js 1`] = ` +exports[`ExportNamed_Class.js-flow 1`] = ` "/** * @flow */ @@ -167,7 +167,7 @@ export var foo2Inst = new ClassFoo2(); " `; -exports[`ExportsANumber.js 1`] = ` +exports[`ExportsANumber.js-flow 1`] = ` "/* @ flow */ export var numValue = 42; @@ -178,7 +178,7 @@ export var numValue = 42; " `; -exports[`import_type.js 1`] = ` +exports[`import_type.js-flow 1`] = ` "/** * @flow */ @@ -347,7 +347,7 @@ function foo() { " `; -exports[`import_type_specifier.js 1`] = ` +exports[`import_type_specifier.js-flow 1`] = ` "/** * @flow */ @@ -364,7 +364,7 @@ import type {} from \\"foo\\"; " `; -exports[`issue-359.js 1`] = ` +exports[`issue-359.js-flow 1`] = ` "/* @flow */ class ClassFoo6 {}; diff --git a/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap b/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap index 61939382b..451cac8b0 100644 --- a/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/import_typeof/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ExportCJSDefault_Class.js 1`] = ` +exports[`ExportCJSDefault_Class.js-flow 1`] = ` "/** * @flow */ @@ -31,7 +31,7 @@ module.exports = ClassFoo3; " `; -exports[`ExportCJSDefault_Number.js 1`] = ` +exports[`ExportCJSDefault_Number.js-flow 1`] = ` "/* @flow */ module.exports = 42; @@ -42,7 +42,7 @@ module.exports = 42; " `; -exports[`ExportCJSNamed_Class.js 1`] = ` +exports[`ExportCJSNamed_Class.js-flow 1`] = ` "/** * @flow */ @@ -61,7 +61,7 @@ exports.ClassFoo4 = ClassFoo4; " `; -exports[`ExportCJSNamed_Number.js 1`] = ` +exports[`ExportCJSNamed_Number.js-flow 1`] = ` "/* @flow */ exports.num = 42; @@ -72,7 +72,7 @@ exports.num = 42; " `; -exports[`ExportDefault_Class.js 1`] = ` +exports[`ExportDefault_Class.js-flow 1`] = ` "/** * @flow */ @@ -97,7 +97,7 @@ export default ClassFoo1; " `; -exports[`ExportDefault_Number.js 1`] = ` +exports[`ExportDefault_Number.js-flow 1`] = ` "/* @flow */ export default 42; @@ -108,7 +108,7 @@ export default 42; " `; -exports[`ExportNamed_Alias.js 1`] = ` +exports[`ExportNamed_Alias.js-flow 1`] = ` "/** * @flow */ @@ -139,7 +139,7 @@ export function givesAFoo3Obj(): AliasFoo3 { " `; -exports[`ExportNamed_Class.js 1`] = ` +exports[`ExportNamed_Class.js-flow 1`] = ` "/** * @flow */ @@ -164,7 +164,7 @@ export { ClassFoo2 }; " `; -exports[`ExportNamed_Multi.js 1`] = ` +exports[`ExportNamed_Multi.js-flow 1`] = ` "// @flow export var num = 42; @@ -177,7 +177,7 @@ export var str = \\"asdf\\"; " `; -exports[`ExportNamed_Number.js 1`] = ` +exports[`ExportNamed_Number.js-flow 1`] = ` "/* @flow */ export var num = 42; @@ -188,7 +188,7 @@ export var num = 42; " `; -exports[`import_typeof.js 1`] = ` +exports[`import_typeof.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/include/foo/batman/__snapshots__/jsfmt.spec.js.snap b/tests/flow/include/foo/batman/__snapshots__/jsfmt.spec.js.snap index fe5ba8d4d..88fadd97c 100644 --- a/tests/flow/include/foo/batman/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/include/foo/batman/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`baz.js 1`] = ` +exports[`baz.js-flow 1`] = ` "/* @flow */ var x: number = \\"not a number\\" // Error string ~> number diff --git a/tests/flow/include/included/__snapshots__/jsfmt.spec.js.snap b/tests/flow/include/included/__snapshots__/jsfmt.spec.js.snap index 9fb80d25a..8953ea276 100644 --- a/tests/flow/include/included/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/include/included/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "(123: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (123: string); diff --git a/tests/flow/incremental/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental/__snapshots__/jsfmt.spec.js.snap index 50ce651ab..f7d26c7bf 100644 --- a/tests/flow/incremental/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "/* @providesModule IncrModuleA */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @providesModule IncrModuleA */ " `; -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "/* @providesModule IncrModuleB @flow */ @@ -22,7 +22,7 @@ var A = require(\\"IncrModuleA\\"); " `; -exports[`dup_a.js 1`] = ` +exports[`dup_a.js-flow 1`] = ` "/* @providesModule IncrModuleA */ var x:string = 0; diff --git a/tests/flow/incremental_basic/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_basic/__snapshots__/jsfmt.spec.js.snap index c1edbeb03..07238a82b 100644 --- a/tests/flow/incremental_basic/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_basic/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "// @flow var a: string = 0; module.exports = a; @@ -11,7 +11,7 @@ module.exports = a; " `; -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "// @flow var a = require('./a'); var b: number = a; @@ -24,7 +24,7 @@ module.exports = b; " `; -exports[`c.js 1`] = ` +exports[`c.js-flow 1`] = ` "// @flow var b = require('./b'); var c: string = b; diff --git a/tests/flow/incremental_basic/tmp1/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_basic/tmp1/__snapshots__/jsfmt.spec.js.snap index d3082e1cd..b3417b251 100644 --- a/tests/flow/incremental_basic/tmp1/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_basic/tmp1/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "// @flow var a = require('./a'); var b = a; diff --git a/tests/flow/incremental_basic/tmp2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_basic/tmp2/__snapshots__/jsfmt.spec.js.snap index 52eea8e27..823373fda 100644 --- a/tests/flow/incremental_basic/tmp2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_basic/tmp2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "// @flow var a = 0; module.exports = a; diff --git a/tests/flow/incremental_basic/tmp3/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_basic/tmp3/__snapshots__/jsfmt.spec.js.snap index 31fd55365..d37710d7b 100644 --- a/tests/flow/incremental_basic/tmp3/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_basic/tmp3/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "// @flow var a = require('./a'); var b: number = a; diff --git a/tests/flow/incremental_cycle/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_cycle/__snapshots__/jsfmt.spec.js.snap index bb21e6316..022b0c11c 100644 --- a/tests/flow/incremental_cycle/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_cycle/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "// @flow class A { @@ -21,7 +21,7 @@ module.exports = A; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// @flow var A = require ('./A'); import type C from './C'; @@ -44,7 +44,7 @@ module.exports = B; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "// @flow var A = require ('./A'); import type B from './B'; diff --git a/tests/flow/incremental_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap index ece381c84..637fc1e89 100644 --- a/tests/flow/incremental_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// @flow var A = require ('./A'); import type C from './C'; @@ -15,7 +15,7 @@ export type B = string; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "// @flow var A = require ('./A'); import type { B } from './B' diff --git a/tests/flow/incremental_cycle/tmp2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_cycle/tmp2/__snapshots__/jsfmt.spec.js.snap index b1877e534..852848f7c 100644 --- a/tests/flow/incremental_cycle/tmp2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_cycle/tmp2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// @flow var A = require ('./A'); //import type C from './C'; diff --git a/tests/flow/incremental_cycle/tmp3/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_cycle/tmp3/__snapshots__/jsfmt.spec.js.snap index c680a7bef..aa67203f1 100644 --- a/tests/flow/incremental_cycle/tmp3/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_cycle/tmp3/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// @flow var A = require ('./A'); import type C from './C'; diff --git a/tests/flow/incremental_delete/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_delete/__snapshots__/jsfmt.spec.js.snap index b3735dc58..58965a187 100644 --- a/tests/flow/incremental_delete/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_delete/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "// @flow var a: string = 0; module.exports = a; @@ -11,7 +11,7 @@ module.exports = a; " `; -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "// @flow var a = require('./a'); var b: number = a; @@ -24,7 +24,7 @@ module.exports = b; " `; -exports[`c.js 1`] = ` +exports[`c.js-flow 1`] = ` "// @flow var b = require('./b'); var c: string = b; @@ -37,7 +37,7 @@ module.exports = c; " `; -exports[`dupe1.js 1`] = ` +exports[`dupe1.js-flow 1`] = ` "/** * Dupe provider 1/2 * @providesModule Dupe @@ -54,7 +54,7 @@ module.exports = \\"dupe1\\"; " `; -exports[`dupe2.js 1`] = ` +exports[`dupe2.js-flow 1`] = ` "/** * Dupe provider 2/2 * @providesModule Dupe @@ -71,7 +71,7 @@ module.exports = \\"dupe2\\"; " `; -exports[`requires_dupe.js 1`] = ` +exports[`requires_dupe.js-flow 1`] = ` "/** * depends on doubly-provided module * @flow @@ -86,7 +86,7 @@ var dupe = require(\\"Dupe\\"); " `; -exports[`requires_unchecked.js 1`] = ` +exports[`requires_unchecked.js-flow 1`] = ` "/** * depends on an unchecked module, which will be deleted * @flow @@ -101,7 +101,7 @@ var unchecked = require(\\"Unchecked\\"); " `; -exports[`unchecked.js 1`] = ` +exports[`unchecked.js-flow 1`] = ` "/** * Not a flow module. * @providesModule Unchecked diff --git a/tests/flow/incremental_duplicate_delete/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_duplicate_delete/__snapshots__/jsfmt.spec.js.snap index e5d93d64c..2fd48345e 100644 --- a/tests/flow/incremental_duplicate_delete/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_duplicate_delete/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/** * @providesModule A * @flow diff --git a/tests/flow/incremental_json/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_json/__snapshots__/jsfmt.spec.js.snap index c7c3ed93f..c01ecbba6 100644 --- a/tests/flow/incremental_json/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_json/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/incremental_mixed_naming_cycle/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_mixed_naming_cycle/__snapshots__/jsfmt.spec.js.snap index cdd9179c0..a6828aafc 100644 --- a/tests/flow/incremental_mixed_naming_cycle/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_mixed_naming_cycle/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -23,7 +23,7 @@ module.exports = \\"A\\"; " `; -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "/** * @providesModule B * @flow @@ -46,7 +46,7 @@ module.exports = \\"B\\"; " `; -exports[`c.js 1`] = ` +exports[`c.js-flow 1`] = ` "/** * @providesModule C * @flow @@ -69,7 +69,7 @@ module.exports = \\"C\\"; " `; -exports[`d.js 1`] = ` +exports[`d.js-flow 1`] = ` "/** * @providesModule D * @flow @@ -90,7 +90,7 @@ module.exports = \\"D\\"; " `; -exports[`root.js 1`] = ` +exports[`root.js-flow 1`] = ` "/** * @providesModule Root * @flow diff --git a/tests/flow/incremental_mixed_naming_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_mixed_naming_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap index ee3cd71ba..9d91d3d4f 100644 --- a/tests/flow/incremental_mixed_naming_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_mixed_naming_cycle/tmp1/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`root.js 1`] = ` +exports[`root.js-flow 1`] = ` "/** * @providesModule Root * @flow diff --git a/tests/flow/incremental_non_flow_move/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_non_flow_move/__snapshots__/jsfmt.spec.js.snap index 8509cf839..f34723eab 100644 --- a/tests/flow/incremental_non_flow_move/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_non_flow_move/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "/* * @providesModule Foo */ @@ -11,7 +11,7 @@ exports[`foo.js 1`] = ` " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/incremental_path/dir/__snapshots__/jsfmt.spec.js.snap b/tests/flow/incremental_path/dir/__snapshots__/jsfmt.spec.js.snap index 7ffab3767..faee048c9 100644 --- a/tests/flow/incremental_path/dir/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/incremental_path/dir/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "// @flow (require('b'): boolean); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap b/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap index f06969d11..7f669b5d5 100644 --- a/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/indexer/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "// No indexer should be fine function foo0(): {} { return { foo: \\"bar\\" } @@ -83,7 +83,7 @@ function foo7(): { [key: string]: number, foo: number } { " `; -exports[`multiple.js 1`] = ` +exports[`multiple.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/init/__snapshots__/jsfmt.spec.js.snap b/tests/flow/init/__snapshots__/jsfmt.spec.js.snap index a0252be55..71607ba9d 100644 --- a/tests/flow/init/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/init/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`hoisted.js 1`] = ` +exports[`hoisted.js-flow 1`] = ` "/** * test initialization tracking in the presence of hoisting * @flow @@ -97,7 +97,7 @@ function _for_of(arr: Array) { " `; -exports[`hoisted2.js 1`] = ` +exports[`hoisted2.js-flow 1`] = ` "/** * test initialization tracking for vars * note: for try/catch/finally, see tests/try/init.js @@ -638,7 +638,7 @@ function for_in_post_init() { " `; -exports[`let.js 1`] = ` +exports[`let.js-flow 1`] = ` "/** * test initialization tracking for lets * @flow @@ -961,7 +961,7 @@ function sub_closure_init_reference() { " `; -exports[`nullable-init.js 1`] = ` +exports[`nullable-init.js-flow 1`] = ` "var o: {x: ?number} = { x: null }; var a: Array = [null,null]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/instanceof/__snapshots__/jsfmt.spec.js.snap b/tests/flow/instanceof/__snapshots__/jsfmt.spec.js.snap index 766182e0b..987732c78 100644 --- a/tests/flow/instanceof/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/instanceof/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`instanceof.js 1`] = ` +exports[`instanceof.js-flow 1`] = ` "/* @flow */ // x instancof t diff --git a/tests/flow/integration/__snapshots__/jsfmt.spec.js.snap b/tests/flow/integration/__snapshots__/jsfmt.spec.js.snap index ee83f3ef2..fe6aad9c8 100644 --- a/tests/flow/integration/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/integration/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar.js 1`] = ` +exports[`bar.js-flow 1`] = ` "// @flow ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // @flow " `; -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "// @flow require('./bar'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/interface/__snapshots__/jsfmt.spec.js.snap b/tests/flow/interface/__snapshots__/jsfmt.spec.js.snap index 7b4dd49c9..6a0e15d67 100644 --- a/tests/flow/interface/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/interface/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`import.js 1`] = ` +exports[`import.js-flow 1`] = ` "interface I { x: number } export type J = I; // workaround for export interface ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ export type J = I; // workaround for export interface " `; -exports[`indexer.js 1`] = ` +exports[`indexer.js-flow 1`] = ` "// @flow interface Ok { @@ -34,7 +34,7 @@ interface Bad { " `; -exports[`interface.js 1`] = ` +exports[`interface.js-flow 1`] = ` "declare class C { x: number; } var x: string = new C().x; @@ -63,7 +63,7 @@ function testInterfaceName(o: I) { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "interface I { y: string } interface I_ { x: number } interface J extends I, I_ { } @@ -112,7 +112,7 @@ var e: E = { x: \\"\\", y: \\"\\", z: \\"\\" }; // error: x and z should " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "import type { J } from './import'; interface K { } interface L extends J, K { y: string } @@ -145,7 +145,7 @@ function bar(m: M) { " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "interface I { x: number, y : string } interface J { y : number } interface K extends I, J { x: string } // error: x is number in I @@ -164,7 +164,7 @@ function foo(k: K) { " `; -exports[`test4.js 1`] = ` +exports[`test4.js-flow 1`] = ` "interface I { foo(x: number): void; } (function foo(x: number) { }: I); // error, property \`foo\` not found function diff --git a/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap b/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap index 1a95c7f3b..bf214a75d 100644 --- a/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/intersection/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`intersection.js 1`] = ` +exports[`intersection.js-flow 1`] = ` "function foo(x: $All): number { return x.type; } @@ -19,7 +19,7 @@ function bar(x: Error & { type: number }): number { " `; -exports[`objassign.js 1`] = ` +exports[`objassign.js-flow 1`] = ` "/** * Test intersection of objects flowing to spread assignment. * @@ -46,7 +46,7 @@ let y: ObjAssignT = { ...x }; // should be fine " `; -exports[`pred.js 1`] = ` +exports[`pred.js-flow 1`] = ` "/** * Test interaction of object intersections and predicates. * Definitions in lib/lib.js @@ -101,7 +101,7 @@ function hasObjectMode_ok(options: DuplexStreamOptions): boolean { " `; -exports[`test_fun.js 1`] = ` +exports[`test_fun.js-flow 1`] = ` "/** * Tests for intersections of function types. * @@ -168,7 +168,7 @@ var g: (_: number | string) => void = f; " `; -exports[`test_obj.js 1`] = ` +exports[`test_obj.js-flow 1`] = ` "/** * Tests for intersections of object types * diff --git a/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap index c00b6ad09..45c0094e5 100644 --- a/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/intersection/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "// @flow // defs used in tests, here to stress tvar machinery diff --git a/tests/flow/issues-11/__snapshots__/jsfmt.spec.js.snap b/tests/flow/issues-11/__snapshots__/jsfmt.spec.js.snap index 71da3bf27..85e30d496 100644 --- a/tests/flow/issues-11/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/issues-11/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`export.js 1`] = ` +exports[`export.js-flow 1`] = ` "/* @flow */ exports.x = 1; exports.y = \\"\\"; @@ -11,7 +11,7 @@ exports.y = \\"\\"; " `; -exports[`import.js 1`] = ` +exports[`import.js-flow 1`] = ` "/* @flow */ var e = require('./export'); var x: string = e.x; diff --git a/tests/flow/iter/__snapshots__/jsfmt.spec.js.snap b/tests/flow/iter/__snapshots__/jsfmt.spec.js.snap index bf18c14a2..66064222e 100644 --- a/tests/flow/iter/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/iter/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`iter.js 1`] = ` +exports[`iter.js-flow 1`] = ` "var a = [true,false]; function foo(x) { } diff --git a/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap index 6a6b92ed2..df3e99375 100644 --- a/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/iterable/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array.js 1`] = ` +exports[`array.js-flow 1`] = ` "/* @flow */ var arrayTest1: Iterable = ([1, 2]: Array); @@ -25,7 +25,7 @@ var arrayTest5: Iterable = [\\"hi\\", 1]; " `; -exports[`caching_bug.js 1`] = ` +exports[`caching_bug.js-flow 1`] = ` "/* @flow */ /** @@ -76,7 +76,7 @@ function miss_the_cache(x: Array): Iterable { " `; -exports[`iter.js 1`] = ` +exports[`iter.js-flow 1`] = ` "/* @flow */ function foo(strs: Iterable): void { @@ -103,7 +103,7 @@ foo(m.keys()); " `; -exports[`iterator_result.js 1`] = ` +exports[`iterator_result.js-flow 1`] = ` "/* @flow */ function makeIterator(coin_flip: () => boolean ): Iterator { @@ -171,7 +171,7 @@ function makeIterator(coin_flip: () => boolean): Iterator { " `; -exports[`map.js 1`] = ` +exports[`map.js-flow 1`] = ` "/* @flow */ function mapTest1(map: Map): Iterable<[string, number]> { @@ -206,7 +206,7 @@ function mapTest4(map: Map): Iterable { " `; -exports[`set.js 1`] = ` +exports[`set.js-flow 1`] = ` "/* @flow */ function setTest1(set: Set): Iterable { @@ -241,7 +241,7 @@ function setTest4(set: Set): Iterable { " `; -exports[`string.js 1`] = ` +exports[`string.js-flow 1`] = ` "/* @flow */ var stringTest1: Iterable = \\"hi\\"; @@ -256,7 +256,7 @@ var stringTest3: Iterable = \\"hi\\"; // Error - string is a Iterable): Iterable); // ok, Iterable<+T> diff --git a/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap b/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap index 207637c54..8805ddae9 100644 --- a/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/jsx_intrinsics.builtin/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow var React = require('react'); @@ -49,7 +49,7 @@ var e: React.Element<{ not_a_real_attr: string }> = ( " `; -exports[`strings.js 1`] = ` +exports[`strings.js-flow 1`] = ` "/* @flow */ var React = require('react'); diff --git a/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap b/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap index 4e1abc7cd..12695ef82 100644 --- a/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/jsx_intrinsics.custom/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`main.js 1`] = ` +exports[`main.js-flow 1`] = ` "// @flow var React = require('react'); @@ -39,7 +39,7 @@ var d: React.Element<{ id: number }> =
; // Error: Props<{i " `; -exports[`strings.js 1`] = ` +exports[`strings.js-flow 1`] = ` "/* @flow */ var React = require('react'); diff --git a/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap index 85d8aec26..48b2a5749 100644 --- a/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/jsx_intrinsics.custom/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`jsx.js 1`] = ` +exports[`jsx.js-flow 1`] = ` "declare var $React: $Exports<'react'>; // fake import type $JSXIntrinsic = Class<$React.Component>; diff --git a/tests/flow/keys/__snapshots__/jsfmt.spec.js.snap b/tests/flow/keys/__snapshots__/jsfmt.spec.js.snap index aab3f39f3..8ffee8559 100644 --- a/tests/flow/keys/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/keys/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`keys.js 1`] = ` +exports[`keys.js-flow 1`] = ` "/* @flow */ function testKeysOfObject(str: string, lit: 'hi') { diff --git a/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap b/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap index 0d9ab0282..305362195 100644 --- a/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/keyvalue/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`keyvalue.js 1`] = ` +exports[`keyvalue.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap b/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap index 59b6c9de8..ca6ed5264 100644 --- a/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/last_duplicate_property_wins/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow // Classes diff --git a/tests/flow/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/lib/__snapshots__/jsfmt.spec.js.snap index 5ffc4ea5d..65699b728 100644 --- a/tests/flow/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libtest.js 1`] = ` +exports[`libtest.js-flow 1`] = ` "var x:string = NaN var y:string = Number.MAX_VALUE; var z:number = new TypeError().name; diff --git a/tests/flow/lib_interfaces/declarations/__snapshots__/jsfmt.spec.js.snap b/tests/flow/lib_interfaces/declarations/__snapshots__/jsfmt.spec.js.snap index 1fe2466cb..089f0cd9c 100644 --- a/tests/flow/lib_interfaces/declarations/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/lib_interfaces/declarations/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`underscore.js 1`] = ` +exports[`underscore.js-flow 1`] = ` "interface C { foo(): CArrays; bar(): C; diff --git a/tests/flow/libconfig/__snapshots__/jsfmt.spec.js.snap b/tests/flow/libconfig/__snapshots__/jsfmt.spec.js.snap index fdaf23df8..de5dddf35 100644 --- a/tests/flow/libconfig/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/libconfig/__snapshots__/jsfmt.spec.js.snap @@ -1,20 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libA.js 1`] = ` +exports[`libA.js-flow 1`] = ` "declare function foo(x: number): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare function foo(x: number): void; " `; -exports[`libB.js 1`] = ` +exports[`libB.js-flow 1`] = ` "declare function bar(x: string): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare function bar(x: string): void; " `; -exports[`libtest.js 1`] = ` +exports[`libtest.js-flow 1`] = ` "foo(123); bar(123); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/libdef_ignored_module/__snapshots__/jsfmt.spec.js.snap b/tests/flow/libdef_ignored_module/__snapshots__/jsfmt.spec.js.snap index baa4e444c..a01b6da93 100644 --- a/tests/flow/libdef_ignored_module/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/libdef_ignored_module/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/* @flow */ import foo from \\"foo\\"; diff --git a/tests/flow/libdef_ignored_module/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/libdef_ignored_module/lib/__snapshots__/jsfmt.spec.js.snap index 81b463e93..d01e7178b 100644 --- a/tests/flow/libdef_ignored_module/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/libdef_ignored_module/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "declare module foo { declare var bar: number; } diff --git a/tests/flow/liberr/__snapshots__/jsfmt.spec.js.snap b/tests/flow/liberr/__snapshots__/jsfmt.spec.js.snap index 5fe7539bc..bae8e2e2b 100644 --- a/tests/flow/liberr/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/liberr/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/liberr/libs/__snapshots__/jsfmt.spec.js.snap b/tests/flow/liberr/libs/__snapshots__/jsfmt.spec.js.snap index 6f2a1e81f..05d62b8f7 100644 --- a/tests/flow/liberr/libs/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/liberr/libs/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`type_error.js 1`] = ` +exports[`type_error.js-flow 1`] = ` "// @flow declare function foo(x: number): Array; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/libflow-typed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/libflow-typed/__snapshots__/jsfmt.spec.js.snap index 2a0466193..3626a289c 100644 --- a/tests/flow/libflow-typed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/libflow-typed/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libtest.js 1`] = ` +exports[`libtest.js-flow 1`] = ` "/* @flow */ const dino : Dinosaur = \\"Stegosaurus\\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/libflow-typed/flow-typed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/libflow-typed/flow-typed/__snapshots__/jsfmt.spec.js.snap index 8b35367c4..9ecdaf32c 100644 --- a/tests/flow/libflow-typed/flow-typed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/libflow-typed/flow-typed/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dino.js 1`] = ` +exports[`dino.js-flow 1`] = ` "declare type Dinosaur = \\"T-Rex\\" | \\"Apatosaurus\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare type Dinosaur = \\"T-Rex\\" | \\"Apatosaurus\\"; diff --git a/tests/flow/librec/__snapshots__/jsfmt.spec.js.snap b/tests/flow/librec/__snapshots__/jsfmt.spec.js.snap index 9cd2cfe6f..c6a385896 100644 --- a/tests/flow/librec/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/librec/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libtest.js 1`] = ` +exports[`libtest.js-flow 1`] = ` "foo(123); bar(123); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/librec/lib/A/__snapshots__/jsfmt.spec.js.snap b/tests/flow/librec/lib/A/__snapshots__/jsfmt.spec.js.snap index cf36e574c..55f4210ff 100644 --- a/tests/flow/librec/lib/A/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/librec/lib/A/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libA.js 1`] = ` +exports[`libA.js-flow 1`] = ` "declare function foo(x: number): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare function foo(x: number): void; diff --git a/tests/flow/librec/lib/B/__snapshots__/jsfmt.spec.js.snap b/tests/flow/librec/lib/B/__snapshots__/jsfmt.spec.js.snap index 0f8dde276..44dd59e80 100644 --- a/tests/flow/librec/lib/B/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/librec/lib/B/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`libB.js 1`] = ` +exports[`libB.js-flow 1`] = ` "declare function bar(x: string): void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare function bar(x: string): void; diff --git a/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap b/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap index 49b274554..c7aa7e681 100644 --- a/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/literal/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`enum.js 1`] = ` +exports[`enum.js-flow 1`] = ` "var APIKeys = { AGE: 'age', NAME: 'name', @@ -17,7 +17,7 @@ module.exports = APIKeys; " `; -exports[`enum_client.js 1`] = ` +exports[`enum_client.js-flow 1`] = ` "var APIKeys = require('./enum'); // object that maps \\"AGE\\" to \\"age\\", \\"NAME\\" to \\"name\\" @@ -64,7 +64,7 @@ var red: string = tuple[indices.red]; // error: tuple[0] is a number " `; -exports[`number.js 1`] = ` +exports[`number.js-flow 1`] = ` "function test1(x: number): number { return -x; } diff --git a/tests/flow/locals/__snapshots__/jsfmt.spec.js.snap b/tests/flow/locals/__snapshots__/jsfmt.spec.js.snap index 7bcf82818..1d51bd6c4 100644 --- a/tests/flow/locals/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/locals/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lex.js 1`] = ` +exports[`lex.js-flow 1`] = ` "function switch_scope(x: mixed) { let a = \\"\\"; let b = \\"\\"; @@ -125,7 +125,7 @@ function for_of_scope(xs: number[]) { " `; -exports[`locals.js 1`] = ` +exports[`locals.js-flow 1`] = ` "var x:string = 0; var x:number = 1; diff --git a/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap b/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap index 99ee49a6c..50807370d 100644 --- a/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/logical/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`logical.js 1`] = ` +exports[`logical.js-flow 1`] = ` "/* @flow */ /** diff --git a/tests/flow/loners/__snapshots__/jsfmt.spec.js.snap b/tests/flow/loners/__snapshots__/jsfmt.spec.js.snap index fee0dc6ba..e3382d496 100644 --- a/tests/flow/loners/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/loners/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`loners.js 1`] = ` +exports[`loners.js-flow 1`] = ` "var o = { x: 5, y: \\"jello\\" }; var z = o.z; var export_o: { x: number; } = o; diff --git a/tests/flow/method_properties/__snapshots__/jsfmt.spec.js.snap b/tests/flow/method_properties/__snapshots__/jsfmt.spec.js.snap index 3aab06e46..9122d8477 100644 --- a/tests/flow/method_properties/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/method_properties/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`exports_optional_prop.js 1`] = ` +exports[`exports_optional_prop.js-flow 1`] = ` "// @flow declare class Foo { @@ -19,7 +19,7 @@ export { Foo }; " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class C { C() { } foo() { } diff --git a/tests/flow/misc/__snapshots__/jsfmt.spec.js.snap b/tests/flow/misc/__snapshots__/jsfmt.spec.js.snap index 7ff636eac..307a5a953 100644 --- a/tests/flow/misc/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/misc/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` " /* @providesModule A */ @@ -32,7 +32,7 @@ f(A.x); // A.x is now a string, by def assign " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` " /* @providesModule B */ @@ -68,7 +68,7 @@ module.exports = B; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` " /* @providesModule C */ @@ -100,7 +100,7 @@ module.exports = C; " `; -exports[`D.js 1`] = ` +exports[`D.js-flow 1`] = ` " /* @providesModule D */ @@ -134,7 +134,7 @@ module.exports = \\"D for dummy\\"; " `; -exports[`E.js 1`] = ` +exports[`E.js-flow 1`] = ` " /* @providesModule E */ @@ -158,7 +158,7 @@ module.exports = { obj: o }; " `; -exports[`F.js 1`] = ` +exports[`F.js-flow 1`] = ` "function fn2(x) { return x.length * 4; } fn2({length: 'hi'}); @@ -177,7 +177,7 @@ function foo(x: Array): string { " `; -exports[`G.js 1`] = ` +exports[`G.js-flow 1`] = ` "var a = { length: \\"duck\\" }; a.length = 123; a.length(); diff --git a/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap b/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap index bd9af98b7..427d1413a 100644 --- a/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/missing_annotation/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array.js 1`] = ` +exports[`array.js-flow 1`] = ` "// @flow type Foo = {}; @@ -15,7 +15,7 @@ export var arr = [f]; " `; -exports[`async_return.js 1`] = ` +exports[`async_return.js-flow 1`] = ` "// @flow export async function foo() { @@ -30,7 +30,7 @@ export async function foo() { " `; -exports[`infer.js 1`] = ` +exports[`infer.js-flow 1`] = ` "/* @flow */ var Foo = { diff --git a/tests/flow/modified_lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/modified_lib/__snapshots__/jsfmt.spec.js.snap index 3c678d30b..c9d381177 100644 --- a/tests/flow/modified_lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/modified_lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow import {bar} from 'foo'; diff --git a/tests/flow/modified_lib/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/modified_lib/lib/__snapshots__/jsfmt.spec.js.snap index 799ce5f94..7c35e6fd4 100644 --- a/tests/flow/modified_lib/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/modified_lib/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare module 'foo' { declare function bar(str: string): number; } diff --git a/tests/flow/module_not_found_errors/src/__snapshots__/jsfmt.spec.js.snap b/tests/flow/module_not_found_errors/src/__snapshots__/jsfmt.spec.js.snap index 3348d752e..56ac71ad0 100644 --- a/tests/flow/module_not_found_errors/src/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/module_not_found_errors/src/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "// @flow require('module_completely_absent'); diff --git a/tests/flow/module_redirect/__snapshots__/jsfmt.spec.js.snap b/tests/flow/module_redirect/__snapshots__/jsfmt.spec.js.snap index 5c4a9be36..f1a67d5e8 100644 --- a/tests/flow/module_redirect/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/module_redirect/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "declare module A { declare function foo(): string; } @@ -11,7 +11,7 @@ declare module A { " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/** * @providesModule B * @flow @@ -28,7 +28,7 @@ module.exports = require(\\"A\\"); " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "/** * @providesModule C * @flow @@ -45,7 +45,7 @@ module.exports = require(\\"B\\"); " `; -exports[`D.js 1`] = ` +exports[`D.js-flow 1`] = ` "/** * @providesModule D * @flow diff --git a/tests/flow/module_use_strict/__snapshots__/jsfmt.spec.js.snap b/tests/flow/module_use_strict/__snapshots__/jsfmt.spec.js.snap index b17c28da9..5a2f8ef1b 100644 --- a/tests/flow/module_use_strict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/module_use_strict/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow (01: number); diff --git a/tests/flow/modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/modules/__snapshots__/jsfmt.spec.js.snap index 1c45d3619..228de3f46 100644 --- a/tests/flow/modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/modules/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cli.js 1`] = ` +exports[`cli.js-flow 1`] = ` "/* @flow */ var f = require('./lib'); @@ -15,7 +15,7 @@ var y: number = f(0); " `; -exports[`cli2.js 1`] = ` +exports[`cli2.js-flow 1`] = ` "/* @flow */ var f = require('./lib'); @@ -30,7 +30,7 @@ f(\\"...\\"); " `; -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "/* @flow */ function g(x:string) { } diff --git a/tests/flow/more_annot/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_annot/__snapshots__/jsfmt.spec.js.snap index 6862ec586..2b84de060 100644 --- a/tests/flow/more_annot/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_annot/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client_object.js 1`] = ` +exports[`client_object.js-flow 1`] = ` "var o = require('./object'); var a:number = o.w.z.y; @@ -11,7 +11,7 @@ var a: number = o.w.z.y; " `; -exports[`object.js 1`] = ` +exports[`object.js-flow 1`] = ` "var o1 = { x: 0, y: \\"\\" }; var o2 = { z: o1 } @@ -34,7 +34,7 @@ module.exports = o3; " `; -exports[`proto.js 1`] = ` +exports[`proto.js-flow 1`] = ` "function Foo() { this.x = 0; } Foo.prototype.m = function() { } @@ -53,7 +53,7 @@ var o2: Foo = new Foo(); " `; -exports[`super.js 1`] = ` +exports[`super.js-flow 1`] = ` "class C { m() { } } class D extends C { } diff --git a/tests/flow/more_classes/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_classes/__snapshots__/jsfmt.spec.js.snap index 0032363be..af259e3d6 100644 --- a/tests/flow/more_classes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_classes/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Bar.js 1`] = ` +exports[`Bar.js-flow 1`] = ` " /* @providesModule Bar */ @@ -44,7 +44,7 @@ module.exports = Bar; " `; -exports[`Foo.js 1`] = ` +exports[`Foo.js-flow 1`] = ` " /* @providesModule Foo */ @@ -100,7 +100,7 @@ module.exports = Foo; " `; -exports[`Qux.js 1`] = ` +exports[`Qux.js-flow 1`] = ` " /* @providesModule Qux */ diff --git a/tests/flow/more_generics/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_generics/__snapshots__/jsfmt.spec.js.snap index 723c1b20b..4e9f569ae 100644 --- a/tests/flow/more_generics/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_generics/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`poly.js 1`] = ` +exports[`poly.js-flow 1`] = ` "var foo1 = function(x:T):T { return x; } function foo2(x:T):S { return x; } diff --git a/tests/flow/more_path/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_path/__snapshots__/jsfmt.spec.js.snap index 1e5eca434..e9a22f6c3 100644 --- a/tests/flow/more_path/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_path/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Condition.js 1`] = ` +exports[`Condition.js-flow 1`] = ` "/* @providesModule Condition */ function f(x:number) { } @@ -126,7 +126,7 @@ module.exports = true; " `; -exports[`FlowSA.js 1`] = ` +exports[`FlowSA.js-flow 1`] = ` " /* @providesModule FlowSA */ @@ -154,7 +154,7 @@ module.exports = FlowSA; " `; -exports[`Sigma.js 1`] = ` +exports[`Sigma.js-flow 1`] = ` " /* @providesModule Sigma */ @@ -245,7 +245,7 @@ module.exports = \\"sigma\\"; " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class BaseClass { baseProp: string; } diff --git a/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap index a31a0a25c..3b12236f6 100644 --- a/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_react/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`API.react.js 1`] = ` +exports[`API.react.js-flow 1`] = ` " var app = require('JSX'); @@ -20,7 +20,7 @@ bar(app.props.children); // No error, App doesn't specify propTypes so anything " `; -exports[`App.react.js 1`] = ` +exports[`App.react.js-flow 1`] = ` " /** * @providesModule App.react @@ -110,7 +110,7 @@ module.exports = App; " `; -exports[`JSX.js 1`] = ` +exports[`JSX.js-flow 1`] = ` " /* @providesModule JSX */ @@ -140,7 +140,7 @@ module.exports = app; " `; -exports[`propTypes.js 1`] = ` +exports[`propTypes.js-flow 1`] = ` "var React = require('React'); var C = React.createClass({ diff --git a/tests/flow/more_statics/__snapshots__/jsfmt.spec.js.snap b/tests/flow/more_statics/__snapshots__/jsfmt.spec.js.snap index 9a4ec6d6a..0c9dbc3cc 100644 --- a/tests/flow/more_statics/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/more_statics/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class_static.js 1`] = ` +exports[`class_static.js-flow 1`] = ` "class B { static foo(): string { return \\"\\"; } } diff --git a/tests/flow/name_prop/__snapshots__/jsfmt.spec.js.snap b/tests/flow/name_prop/__snapshots__/jsfmt.spec.js.snap index 705948456..42c02bcf1 100644 --- a/tests/flow/name_prop/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/name_prop/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class.js 1`] = ` +exports[`class.js-flow 1`] = ` "class A {} var test1 = A.bar; // Error bar doesn't exist @@ -25,7 +25,7 @@ var test6: number = a.constructor.name; // Error string ~> number " `; -exports[`function.js 1`] = ` +exports[`function.js-flow 1`] = ` "/* TODO - we currently say that a function's statics are an AnyObjT and * anything goes. When we start enforcing the statics properly, we'll need to * know that .name exists diff --git a/tests/flow/namespace/__snapshots__/jsfmt.spec.js.snap b/tests/flow/namespace/__snapshots__/jsfmt.spec.js.snap index 3459fd94e..20588180b 100644 --- a/tests/flow/namespace/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/namespace/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var ns = require('./namespace') var bar: string = ns.foo @@ -11,7 +11,7 @@ var bar: string = ns.foo; " `; -exports[`namespace.js 1`] = ` +exports[`namespace.js-flow 1`] = ` "/*@flow*/// import type { T } from '...' type T = (x:number) => void; var f: T = function(x:string): void { } diff --git a/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap b/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap index 590423e2f..76f23db58 100644 --- a/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/new_react/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`FeedUFI.react.js 1`] = ` +exports[`FeedUFI.react.js-flow 1`] = ` "/** * Copyright 2004-present Facebook. All Rights Reserved. * @@ -79,7 +79,7 @@ module.exports = FeedUFI; " `; -exports[`Mixin.js 1`] = ` +exports[`Mixin.js-flow 1`] = ` "/* @providesModule Mixin */ module.exports = { success: function() { } @@ -92,7 +92,7 @@ module.exports = { " `; -exports[`UFILikeCount.react.js 1`] = ` +exports[`UFILikeCount.react.js-flow 1`] = ` "/** * Copyright 2004-present Facebook. All Rights Reserved. * @@ -143,7 +143,7 @@ module.exports = UFILikeCount; " `; -exports[`bad_default_props.js 1`] = ` +exports[`bad_default_props.js-flow 1`] = ` "var React = require('React'); type T1 = { } @@ -214,7 +214,7 @@ class C6 extends React.Component { " `; -exports[`classes.js 1`] = ` +exports[`classes.js-flow 1`] = ` "var React = require('React'); type DefaultProps = { }; @@ -379,7 +379,7 @@ FooLegacy.bar(); " `; -exports[`import-react.js 1`] = ` +exports[`import-react.js-flow 1`] = ` "/* @flow */ // Testing local binding of React in all kinds of ways. The only reason this @@ -422,7 +422,7 @@ class HelloMessage extends React.Component { " `; -exports[`new_react.js 1`] = ` +exports[`new_react.js-flow 1`] = ` "var React = require('react'); var Mixin = require('Mixin'); var C = React.createClass({ @@ -492,7 +492,7 @@ var x: number = C.displayName; " `; -exports[`propTypes.js 1`] = ` +exports[`propTypes.js-flow 1`] = ` "var React = require('react'); var PropTypes = React.PropTypes; @@ -538,7 +538,7 @@ var props: Array<{ label: string, value?: number }> = [ " `; -exports[`props.js 1`] = ` +exports[`props.js-flow 1`] = ` "var React = require('react'); var TestProps = React.createClass({ @@ -596,7 +596,7 @@ var FooProps = React.createClass({ " `; -exports[`props2.js 1`] = ` +exports[`props2.js-flow 1`] = ` "var React = require('react'); var C = React.createClass({ propTypes: { @@ -635,7 +635,7 @@ var D = React.createClass({ " `; -exports[`props3.js 1`] = ` +exports[`props3.js-flow 1`] = ` "var React = require('react'); var TestProps = React.createClass({ // Do something illegal inside of propTypes and make sure Flow notices @@ -746,7 +746,7 @@ var TestProps = React.createClass({ " `; -exports[`props4.js 1`] = ` +exports[`props4.js-flow 1`] = ` "// @flow import React from \\"React\\"; @@ -800,7 +800,7 @@ React.render(, document.body); " `; -exports[`props5.js 1`] = ` +exports[`props5.js-flow 1`] = ` "var React = require('React'); var C = React.createClass({ @@ -823,7 +823,7 @@ module.exports = C; " `; -exports[`state.js 1`] = ` +exports[`state.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -874,7 +874,7 @@ var ReactClass = React.createClass({ " `; -exports[`state2.js 1`] = ` +exports[`state2.js-flow 1`] = ` "// @flow var React = require('react'); @@ -913,7 +913,7 @@ module.exports = Comp; " `; -exports[`state3.js 1`] = ` +exports[`state3.js-flow 1`] = ` "var React = require('react'); var TestState = React.createClass({ @@ -952,7 +952,7 @@ var TestState = React.createClass({ " `; -exports[`state4.js 1`] = ` +exports[`state4.js-flow 1`] = ` "var React = require('React'); var C = React.createClass({ @@ -982,7 +982,7 @@ var C = React.createClass({ " `; -exports[`state5.js 1`] = ` +exports[`state5.js-flow 1`] = ` "var React = require('React'); class C extends React.Component { diff --git a/tests/flow/new_react/fakelib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/new_react/fakelib/__snapshots__/jsfmt.spec.js.snap index 5cd44b0bf..ed7aaf693 100644 --- a/tests/flow/new_react/fakelib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/new_react/fakelib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`type_aliases.js 1`] = ` +exports[`type_aliases.js-flow 1`] = ` "declare var $React: $Exports<'react'>; // fake import // Strawman: revised definition of $jsx (alternatively, React.Element). // Using bounded poly to specify a constraint on a type parameter, and diff --git a/tests/flow/node_haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_haste/__snapshots__/jsfmt.spec.js.snap index 759c21638..a8a16ccf0 100644 --- a/tests/flow/node_haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_haste/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var md5 = require('./md5'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var md5 = require(\\"./md5\\"); " `; -exports[`md5.js 1`] = ` +exports[`md5.js-flow 1`] = ` "/* @providesModule md5 */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @providesModule md5 */ diff --git a/tests/flow/node_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap index b11a700fa..c3ae14a18 100644 --- a/tests/flow/node_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_haste/external/_d3/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`min.js 1`] = ` +exports[`min.js-flow 1`] = ` "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " `; diff --git a/tests/flow/node_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap index e8efa1c65..db81d290a 100644 --- a/tests/flow/node_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_haste/foo/bar/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var docblock = require('qux/docblock'); var min = require('d3/min.js'); var corge = require('qux/corge'); diff --git a/tests/flow/node_haste/ws/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_haste/ws/__snapshots__/jsfmt.spec.js.snap index 3959b3ee8..42591c271 100644 --- a/tests/flow/node_haste/ws/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_haste/ws/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ " `; diff --git a/tests/flow/node_haste/ws/test/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_haste/ws/test/__snapshots__/jsfmt.spec.js.snap index 551421890..deb31ecd9 100644 --- a/tests/flow/node_haste/ws/test/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_haste/ws/test/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client.js 1`] = ` +exports[`client.js-flow 1`] = ` "var ws = require('../'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var ws = require(\\"../\\"); diff --git a/tests/flow/node_modules_with_symlinks/root/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_modules_with_symlinks/root/__snapshots__/jsfmt.spec.js.snap index 3320a0505..eee3e8cad 100644 --- a/tests/flow/node_modules_with_symlinks/root/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_modules_with_symlinks/root/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('symlink_lib'); var y = require('symlink_lib_outside_root'); console.log(x); diff --git a/tests/flow/node_modules_with_symlinks/root/symlink_lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_modules_with_symlinks/root/symlink_lib/__snapshots__/jsfmt.spec.js.snap index 78c3adac8..cfb809c93 100644 --- a/tests/flow/node_modules_with_symlinks/root/symlink_lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_modules_with_symlinks/root/symlink_lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "module.exports = { bar: \\"bar\\" }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = { bar: \\"bar\\" }; diff --git a/tests/flow/node_modules_with_symlinks/symlink_lib_outside_root/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_modules_with_symlinks/symlink_lib_outside_root/__snapshots__/jsfmt.spec.js.snap index 78c3adac8..cfb809c93 100644 --- a/tests/flow/node_modules_with_symlinks/symlink_lib_outside_root/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_modules_with_symlinks/symlink_lib_outside_root/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "module.exports = { bar: \\"bar\\" }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = { bar: \\"bar\\" }; diff --git a/tests/flow/node_modules_without_json/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_modules_without_json/__snapshots__/jsfmt.spec.js.snap index a58cb5f20..bee2f0fa7 100644 --- a/tests/flow/node_modules_without_json/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_modules_without_json/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow let foo = require('foo'); diff --git a/tests/flow/node_tests/assert/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/assert/__snapshots__/jsfmt.spec.js.snap index 978f1d31a..1445b4e35 100644 --- a/tests/flow/node_tests/assert/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/assert/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`assert.js 1`] = ` +exports[`assert.js-flow 1`] = ` "/* @flow */ var assert = require(\\"assert\\") diff --git a/tests/flow/node_tests/basic/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/basic/__snapshots__/jsfmt.spec.js.snap index 536a7b06f..195997030 100644 --- a/tests/flow/node_tests/basic/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/basic/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar.js 1`] = ` +exports[`bar.js-flow 1`] = ` "module.exports = \\"bar\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = \\"bar\\"; " `; -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('./bar.js'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/basic_file/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/basic_file/__snapshots__/jsfmt.spec.js.snap index 3852de7d4..4af513774 100644 --- a/tests/flow/node_tests/basic_file/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/basic_file/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar.js 1`] = ` +exports[`bar.js-flow 1`] = ` "module.exports = \\"bar\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = \\"bar\\"; " `; -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('./bar'); // bar.js does not work console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/basic_node_modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/basic_node_modules/__snapshots__/jsfmt.spec.js.snap index f761168d7..3323c5f05 100644 --- a/tests/flow/node_tests/basic_node_modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/basic_node_modules/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('bar.js'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/basic_node_modules_with_path/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/basic_node_modules_with_path/__snapshots__/jsfmt.spec.js.snap index 4900c86d4..221088d5c 100644 --- a/tests/flow/node_tests/basic_node_modules_with_path/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/basic_node_modules_with_path/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('bar_lib/bar'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/basic_package/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/basic_package/__snapshots__/jsfmt.spec.js.snap index 7bd83213b..928f26460 100644 --- a/tests/flow/node_tests/basic_package/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/basic_package/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('./bar_lib'); // 'bar_lib' does not work! console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/basic_package/bar_lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/basic_package/bar_lib/__snapshots__/jsfmt.spec.js.snap index e8f131d2f..0f62f08dd 100644 --- a/tests/flow/node_tests/basic_package/bar_lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/basic_package/bar_lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar.js 1`] = ` +exports[`bar.js-flow 1`] = ` "module.exports = \\"bar\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = \\"bar\\"; diff --git a/tests/flow/node_tests/buffer/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/buffer/__snapshots__/jsfmt.spec.js.snap index 6f408435e..7ad31cf7a 100644 --- a/tests/flow/node_tests/buffer/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/buffer/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`buffer.js 1`] = ` +exports[`buffer.js-flow 1`] = ` "/* @flow */ let bool: boolean = false; diff --git a/tests/flow/node_tests/child_process/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/child_process/__snapshots__/jsfmt.spec.js.snap index 965e74e9c..1f4a70713 100644 --- a/tests/flow/node_tests/child_process/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/child_process/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`exec.js 1`] = ` +exports[`exec.js-flow 1`] = ` "/* @flow */ var exec = require('child_process').exec; @@ -37,7 +37,7 @@ exec(\\"ls\\", { maxBuffer: 100 }, function(error, stdout, stderr) { " `; -exports[`execFile.js 1`] = ` +exports[`execFile.js-flow 1`] = ` "/* @flow */ var execFile = require('child_process').execFile; @@ -96,7 +96,7 @@ execFile(\\"ls\\", [\\"-l\\"], { timeout: 250 }, function(error, stdout, stderr) " `; -exports[`execSync.js 1`] = ` +exports[`execSync.js-flow 1`] = ` "/* @flow */ var execSync = require('child_process').execSync; @@ -121,7 +121,7 @@ execSync(\\"ls\\", { stdio: [\\"inherit\\"] }); // error, no signatures match " `; -exports[`spawn.js 1`] = ` +exports[`spawn.js-flow 1`] = ` "/* @flow */ var child_process = require('child_process'); diff --git a/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap index a08a576e1..56e9f65e3 100644 --- a/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/crypto/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`crypto.js 1`] = ` +exports[`crypto.js-flow 1`] = ` "/* @flow */ const crypto = require('crypto'); diff --git a/tests/flow/node_tests/fs/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/fs/__snapshots__/jsfmt.spec.js.snap index f200aa9d6..a57d40d76 100644 --- a/tests/flow/node_tests/fs/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/fs/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`fs.js 1`] = ` +exports[`fs.js-flow 1`] = ` "var fs = require(\\"fs\\"); /* readFile */ diff --git a/tests/flow/node_tests/json_file/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/json_file/__snapshots__/jsfmt.spec.js.snap index 71e060189..c11b368ef 100644 --- a/tests/flow/node_tests/json_file/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/json_file/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow let data = require('./package/index.json'); diff --git a/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap index b7ae926b8..e997cfa91 100644 --- a/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/json_file/package2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`index.js 1`] = ` +exports[`index.js-flow 1`] = ` "// @flow module.exports = { diff --git a/tests/flow/node_tests/os/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/os/__snapshots__/jsfmt.spec.js.snap index db73cfcc6..7ce669ff5 100644 --- a/tests/flow/node_tests/os/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/os/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`userInfo.js 1`] = ` +exports[`userInfo.js-flow 1`] = ` "/* @flow */ var os = require('os'); diff --git a/tests/flow/node_tests/package_file/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/package_file/__snapshots__/jsfmt.spec.js.snap index 93a7aa6e3..c8b007082 100644 --- a/tests/flow/node_tests/package_file/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/package_file/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar_lib.js 1`] = ` +exports[`bar_lib.js-flow 1`] = ` "module.exports = \\"bar_lib\\"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = \\"bar_lib\\"; " `; -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x: string = require('./bar_lib'); // 'bar_lib' does not work! console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/package_file/bar_lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/package_file/bar_lib/__snapshots__/jsfmt.spec.js.snap index 35ab1a61b..4dc720dd6 100644 --- a/tests/flow/node_tests/package_file/bar_lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/package_file/bar_lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar.js 1`] = ` +exports[`bar.js-flow 1`] = ` "module.exports = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = 0; diff --git a/tests/flow/node_tests/package_file_node_modules/foo/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/package_file_node_modules/foo/__snapshots__/jsfmt.spec.js.snap index 3715733f4..8fff0f175 100644 --- a/tests/flow/node_tests/package_file_node_modules/foo/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/package_file_node_modules/foo/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x: string = require('bar_lib'); // 'bar_lib' does not work! console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/path_node_modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/path_node_modules/__snapshots__/jsfmt.spec.js.snap index 61bc8b8ec..b3adfcd67 100644 --- a/tests/flow/node_tests/path_node_modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/path_node_modules/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('bar_lib/src/lib/bar'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/path_node_modules_with_short_main/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/path_node_modules_with_short_main/__snapshots__/jsfmt.spec.js.snap index a9c2f03c3..9d251c0ad 100644 --- a/tests/flow/node_tests/path_node_modules_with_short_main/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/path_node_modules_with_short_main/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('bar_lib'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/path_node_modules_without_main/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/path_node_modules_without_main/__snapshots__/jsfmt.spec.js.snap index a9c2f03c3..9d251c0ad 100644 --- a/tests/flow/node_tests/path_node_modules_without_main/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/path_node_modules_without_main/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('bar_lib'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/path_package/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/path_package/__snapshots__/jsfmt.spec.js.snap index 023ba873c..7fd8c5e7e 100644 --- a/tests/flow/node_tests/path_package/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/path_package/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "var x = require('bar_lib/src/lib'); console.log(x); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/node_tests/stream/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/stream/__snapshots__/jsfmt.spec.js.snap index 9fb02e3e7..c1b51de0f 100644 --- a/tests/flow/node_tests/stream/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/stream/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`stream.js 1`] = ` +exports[`stream.js-flow 1`] = ` "/* @flow */ var child_process = require('child_process'); diff --git a/tests/flow/node_tests/timers/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/timers/__snapshots__/jsfmt.spec.js.snap index fdfad78c7..cf84e69ef 100644 --- a/tests/flow/node_tests/timers/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/timers/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`timers.js 1`] = ` +exports[`timers.js-flow 1`] = ` "// @flow function setImmediateCallback(): number { diff --git a/tests/flow/node_tests/url/__snapshots__/jsfmt.spec.js.snap b/tests/flow/node_tests/url/__snapshots__/jsfmt.spec.js.snap index c9285b71a..079b71f16 100644 --- a/tests/flow/node_tests/url/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/node_tests/url/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`url.js 1`] = ` +exports[`url.js-flow 1`] = ` "const url = require('url'); url.format(url.parse('https://example.com/foo')); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/nullable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/nullable/__snapshots__/jsfmt.spec.js.snap index f0aea86fc..67ced24ec 100644 --- a/tests/flow/nullable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/nullable/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`maybe.js 1`] = ` +exports[`maybe.js-flow 1`] = ` "// @flow // unwrapping nested maybes should work @@ -15,7 +15,7 @@ exports[`maybe.js 1`] = ` " `; -exports[`nullable.js 1`] = ` +exports[`nullable.js-flow 1`] = ` "function foo():string { return null; } function bar():?string { return null; } @@ -63,7 +63,7 @@ var array_of_nullable: Array = [null, 3]; " `; -exports[`simple_nullable.js 1`] = ` +exports[`simple_nullable.js-flow 1`] = ` "function foo(x:?string) {} function bar(x:?number) {} foo('hmm'); diff --git a/tests/flow/number_constants/__snapshots__/jsfmt.spec.js.snap b/tests/flow/number_constants/__snapshots__/jsfmt.spec.js.snap index 295ad2ef4..b51fb2ee5 100644 --- a/tests/flow/number_constants/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/number_constants/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`number_constants.js 1`] = ` +exports[`number_constants.js-flow 1`] = ` "var a: number = Number.MAX_SAFE_INTEGER; var b: string = Number.MAX_SAFE_INTEGER; var c: number = Number.MIN_SAFE_INTEGER; diff --git a/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap index 5d1dad11a..e0289b017 100644 --- a/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object-method/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`id.js 1`] = ` +exports[`id.js-flow 1`] = ` "declare function id(_: X): X; module.exports = id; @@ -11,7 +11,7 @@ module.exports = id; " `; -exports[`subtype.js 1`] = ` +exports[`subtype.js-flow 1`] = ` "interface Interface { m(): void; } @@ -30,7 +30,7 @@ function subtypeCheck(x: Interface): ObjectType { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "const id = require('./id'); export type ObjectType = { @@ -59,7 +59,7 @@ module.exports = id(methodCaller); " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "/* @flow */ function f() { @@ -98,7 +98,7 @@ b.f(); // error, property \`p\` not found " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "/* @flow */ function foo() { diff --git a/tests/flow/object_annot/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_annot/__snapshots__/jsfmt.spec.js.snap index 124de1878..63d0d07b2 100644 --- a/tests/flow/object_annot/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_annot/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "function foo(x: Array): Array { return x.sort((a, b) => a.foo - b.foo); } diff --git a/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap index cf569e87f..866949f2f 100644 --- a/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_api/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a.js 1`] = ` +exports[`a.js-flow 1`] = ` "/* @flow */ module.exports = { a() {} };~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -10,7 +10,7 @@ module.exports = { a() {} }; " `; -exports[`b.js 1`] = ` +exports[`b.js-flow 1`] = ` "/* @flow */ var a = require('./a'); @@ -27,7 +27,7 @@ module.exports = b; " `; -exports[`c.js 1`] = ` +exports[`c.js-flow 1`] = ` "/* @flow */ var c = require('./b'); @@ -41,7 +41,7 @@ c.foo(); " `; -exports[`object_assign.js 1`] = ` +exports[`object_assign.js-flow 1`] = ` "/* @flow */ var export_ = Object.assign({}, { @@ -75,7 +75,7 @@ module.exports = export_; " `; -exports[`object_create.js 1`] = ` +exports[`object_create.js-flow 1`] = ` "/* @flow */ class C { foo: string; } @@ -116,7 +116,7 @@ declare var o: O; " `; -exports[`object_getprototypeof.js 1`] = ` +exports[`object_getprototypeof.js-flow 1`] = ` "// @flow class Foo {} @@ -143,7 +143,7 @@ let tests = [ " `; -exports[`object_keys.js 1`] = ` +exports[`object_keys.js-flow 1`] = ` "/* @flow */ var sealed = {one: 'one', two: 'two'}; @@ -212,7 +212,7 @@ class Bar extends Foo { " `; -exports[`object_missing.js 1`] = ` +exports[`object_missing.js-flow 1`] = ` "// @flow let tests = [ @@ -231,7 +231,7 @@ let tests = [ " `; -exports[`object_prototype.js 1`] = ` +exports[`object_prototype.js-flow 1`] = ` "/* @flow */ function takesABool(x: boolean) {} diff --git a/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap index d011c3c8a..16807caee 100644 --- a/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_assign/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/** * @flow */ @@ -61,7 +61,7 @@ module.exports = { " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/** * @flow */ @@ -100,7 +100,7 @@ A.js|8 col 23 error| object literal " `; -exports[`apply.js 1`] = ` +exports[`apply.js-flow 1`] = ` "// @flow (Object.assign.apply(null, [{}, {a: 1}, {b: 'foo'}]): {a: number, b: string}); @@ -116,7 +116,7 @@ exports[`apply.js 1`] = ` " `; -exports[`non_objects.js 1`] = ` +exports[`non_objects.js-flow 1`] = ` "/* @flow */ Object.assign(\\"123\\", {a: \\"foo\\"}); @@ -131,7 +131,7 @@ Object.assign({ a: \\"foo\\" }, 123); " `; -exports[`undefined.js 1`] = ` +exports[`undefined.js-flow 1`] = ` "/* @flow */ var React = require('react'); diff --git a/tests/flow/object_freeze/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_freeze/__snapshots__/jsfmt.spec.js.snap index 1994cb924..d65754b16 100644 --- a/tests/flow/object_freeze/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_freeze/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`object_freeze.js 1`] = ` +exports[`object_freeze.js-flow 1`] = ` "/* @flow */ var foo = Object.freeze({bar: '12345'}); diff --git a/tests/flow/object_is/__snapshots__/jsfmt.spec.js.snap b/tests/flow/object_is/__snapshots__/jsfmt.spec.js.snap index bbb4af7e1..a3233d6c3 100644 --- a/tests/flow/object_is/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/object_is/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`object_is.js 1`] = ` +exports[`object_is.js-flow 1`] = ` "Object.is(1, 1); Object.is(1, 2); Object.is(1, {}); diff --git a/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap b/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap index dfdbf1d99..f07d9a310 100644 --- a/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/objects/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`conversion.js 1`] = ` +exports[`conversion.js-flow 1`] = ` "/* @flow */ (Object({foo: 'bar'}): {foo: string}); @@ -43,7 +43,7 @@ var z = Object(123); // error (next line makes this not match any signatures) " `; -exports[`objects.js 1`] = ` +exports[`objects.js-flow 1`] = ` "/* @flow */ var x : {'123': string, bar: string} = {'123': 'val', bar: 'bar'}; @@ -84,7 +84,7 @@ y[\\"bar\\"] = \\"abc\\"; // error, property not found " `; -exports[`unaliased_assign.js 1`] = ` +exports[`unaliased_assign.js-flow 1`] = ` "/** * test handling of unaliased value assignment. * diff --git a/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap b/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap index c1720fda5..00c7385ca 100644 --- a/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/objmap/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`objmap.js 1`] = ` +exports[`objmap.js-flow 1`] = ` "declare function promiseAllByKey(o: O): Promise<$ObjMap>; declare function keyMirror(o: O): $ObjMapi(k:K) => K>; diff --git a/tests/flow/optional/__snapshots__/jsfmt.spec.js.snap b/tests/flow/optional/__snapshots__/jsfmt.spec.js.snap index 7c1df7b85..20106fefa 100644 --- a/tests/flow/optional/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/optional/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`client_optional.js 1`] = ` +exports[`client_optional.js-flow 1`] = ` "var qux = require('./optional'); qux(0); @@ -11,7 +11,7 @@ qux(0); " `; -exports[`default.js 1`] = ` +exports[`default.js-flow 1`] = ` "function f(foo, bar = foo): [T, T] { return [foo, bar]; } @@ -22,7 +22,7 @@ function f(foo, bar = foo): [T, T] { " `; -exports[`generic.js 1`] = ` +exports[`generic.js-flow 1`] = ` "function x(x: T = 0) {} class C { @@ -37,7 +37,7 @@ class C { " `; -exports[`maybe.js 1`] = ` +exports[`maybe.js-flow 1`] = ` "function foo(x?: string): ?string { return x; } @@ -48,7 +48,7 @@ function foo(x?: string): ?string { " `; -exports[`nullable.js 1`] = ` +exports[`nullable.js-flow 1`] = ` "/* @flow */ function optionalNullable1(x: {y?: ?number}) { @@ -151,7 +151,7 @@ function optionalNullable8(x: { y?: ?number }) { " `; -exports[`optional.js 1`] = ` +exports[`optional.js-flow 1`] = ` "function bar(x?,y?) { x * 0; } bar(0); @@ -185,7 +185,7 @@ module.exports = qux; " `; -exports[`optional_param.js 1`] = ` +exports[`optional_param.js-flow 1`] = ` "/* @flow */ function foo(x?: string): string { if (x == null) { return 'foo'; } @@ -272,7 +272,7 @@ function testOptionalNullableFlowingToNullable(x?: ?string): ?string { " `; -exports[`optional_param2.js 1`] = ` +exports[`optional_param2.js-flow 1`] = ` "declare class I { map( mapper: (value?: V) => M @@ -289,7 +289,7 @@ var j: I = i.map(id => id); " `; -exports[`optional_param3.js 1`] = ` +exports[`optional_param3.js-flow 1`] = ` "function foo(x?: number) {} foo(undefined); // ok @@ -308,7 +308,7 @@ bar(undefined); // ok " `; -exports[`optional_param4.js 1`] = ` +exports[`optional_param4.js-flow 1`] = ` "/* @flow */ function foo(x?: number, ...y: Array): [?number, Array] { @@ -337,7 +337,7 @@ foo(123, true); // ERROR boolean ~> string " `; -exports[`undefined.js 1`] = ` +exports[`undefined.js-flow 1`] = ` "var x; function foo(bar? = undefined) { @@ -360,7 +360,7 @@ function bar() { " `; -exports[`undefined2.js 1`] = ` +exports[`undefined2.js-flow 1`] = ` "var x; function foo(bar?) { diff --git a/tests/flow/optional_props/__snapshots__/jsfmt.spec.js.snap b/tests/flow/optional_props/__snapshots__/jsfmt.spec.js.snap index 7b95834ab..705919ad5 100644 --- a/tests/flow/optional_props/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/optional_props/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var x: { } = { foo: 0 }; var y: { foo?: string } = x; // OK in TypeScript, not OK in Flow @@ -29,7 +29,7 @@ bar({ foo: \\"\\" }); " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "var a: { foo?: string } = {}; a.foo = undefined; // This is not an error a.foo = null; // But this is an error @@ -60,7 +60,7 @@ var f: { foo?: ?string } = { foo: null }; // Also fine " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "// @flow /* @@ -177,7 +177,7 @@ class A { " `; -exports[`test3_failure.js 1`] = ` +exports[`test3_failure.js-flow 1`] = ` "// generalization of failure in test3.js class A { diff --git a/tests/flow/overload/__snapshots__/jsfmt.spec.js.snap b/tests/flow/overload/__snapshots__/jsfmt.spec.js.snap index 813dfaaea..ecbc53cf4 100644 --- a/tests/flow/overload/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/overload/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`overload.js 1`] = ` +exports[`overload.js-flow 1`] = ` "/** * tests of overload selection * @@ -107,7 +107,7 @@ var z2:Array = new Dummy().dumber(bar2); " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "function foo() { var output = new FakeUint8Array(); output.set(new FakeUint8Array(), 0); // matches one of the overloads of set @@ -120,7 +120,7 @@ function foo() { " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "declare class Foo { bar(x: 'hmm'): number; bar(x: string): string; @@ -139,7 +139,7 @@ var foo = new Foo(); " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "// passing a union-like thing into an overload is ok // if overload handles each branch of union-like thing @@ -186,7 +186,7 @@ h(x_h.p); // ok " `; -exports[`union.js 1`] = ` +exports[`union.js-flow 1`] = ` "function foo (x: $Either,U>): Array { return []; } var x1:number = foo(0)[0]; diff --git a/tests/flow/overload/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/overload/lib/__snapshots__/jsfmt.spec.js.snap index a4b3da9fb..1284e0ff7 100644 --- a/tests/flow/overload/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/overload/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare class FakeUint8Array { set(index: number, value: number): void; set(array: FakeUint8Array | Array, offset?: number): void; diff --git a/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap b/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap index 9132e2aca..9faf5e5b3 100644 --- a/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/parse/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`no_parse_error.js 1`] = ` +exports[`no_parse_error.js-flow 1`] = ` "/* @flow */ diff --git a/tests/flow/parse_error_haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/parse_error_haste/__snapshots__/jsfmt.spec.js.snap index c29fce308..edd714109 100644 --- a/tests/flow/parse_error_haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/parse_error_haste/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Client.js 1`] = ` +exports[`Client.js-flow 1`] = ` "/** * Client imports some but not all modules, * triggering/suppressing parse errors. diff --git a/tests/flow/parse_error_node/__snapshots__/jsfmt.spec.js.snap b/tests/flow/parse_error_node/__snapshots__/jsfmt.spec.js.snap index 794d5d41e..c1acd8fce 100644 --- a/tests/flow/parse_error_node/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/parse_error_node/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Client.js 1`] = ` +exports[`Client.js-flow 1`] = ` "/** * Client imports some but not all modules, * triggering/suppressing parse errors. diff --git a/tests/flow/path/__snapshots__/jsfmt.spec.js.snap b/tests/flow/path/__snapshots__/jsfmt.spec.js.snap index 967267362..f244ce2a0 100644 --- a/tests/flow/path/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/path/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`while.js 1`] = ` +exports[`while.js-flow 1`] = ` "var x = 1; while(typeof x == \\"number\\" || typeof x == \\"string\\") { x = x + 1; diff --git a/tests/flow/plsummit/__snapshots__/jsfmt.spec.js.snap b/tests/flow/plsummit/__snapshots__/jsfmt.spec.js.snap index 5c941a0ac..92ab408d0 100644 --- a/tests/flow/plsummit/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/plsummit/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`arrays.js 1`] = ` +exports[`arrays.js-flow 1`] = ` "function foo(x) { return [x, x > 0, \\"number \\" + x]; } var [n, b, s] = foo(42); @@ -15,7 +15,7 @@ n * s.length; " `; -exports[`export_class.js 1`] = ` +exports[`export_class.js-flow 1`] = ` "class C { x: number; constructor(x: number) { this.x = x; } @@ -34,7 +34,7 @@ module.exports = C; " `; -exports[`generics.js 1`] = ` +exports[`generics.js-flow 1`] = ` "/* @flow */ var r: number = 0; @@ -50,7 +50,7 @@ function foo(x: X): X { " `; -exports[`import_class.js 1`] = ` +exports[`import_class.js-flow 1`] = ` "var C = require('./export_class'); var c = new C(\\"\\"); @@ -61,7 +61,7 @@ var c = new C(\\"\\"); " `; -exports[`locals.js 1`] = ` +exports[`locals.js-flow 1`] = ` "/* @flow */ function foo() { @@ -88,7 +88,7 @@ function bar(x: ?string): number { " `; -exports[`objects.js 1`] = ` +exports[`objects.js-flow 1`] = ` "function C() { this.x = 0; } C.prototype.foo = function() { return this.x; } diff --git a/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap b/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap index 48d7a7075..6e383b52d 100644 --- a/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/poly/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`annot.js 1`] = ` +exports[`annot.js-flow 1`] = ` "class A { } new A; // OK, implicitly inferred type args class B extends A { } // OK, same as above @@ -29,7 +29,7 @@ function bar(): A<*> { " `; -exports[`implicit_bounded_instantiation.js 1`] = ` +exports[`implicit_bounded_instantiation.js-flow 1`] = ` "// @flow class Base {} @@ -74,7 +74,7 @@ a.meth(new Base()); // Error: Base ~> Middle " `; -exports[`issue-1029.js 1`] = ` +exports[`issue-1029.js-flow 1`] = ` "// @flow // naive unification causes combinatorial explosion here, @@ -115,7 +115,7 @@ unbox(bool); " `; -exports[`poly.js 1`] = ` +exports[`poly.js-flow 1`] = ` "class Foo { x:T; constructor(x:T) { this.x = x; } @@ -160,7 +160,7 @@ var z: Foo = Q.bar(foo, \\"\\"); " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class C { foo(x: X): X { return x; } foo_(x: X): number { return x; } diff --git a/tests/flow/poly_class_export/__snapshots__/jsfmt.spec.js.snap b/tests/flow/poly_class_export/__snapshots__/jsfmt.spec.js.snap index db73d5173..fe9cc9bec 100644 --- a/tests/flow/poly_class_export/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/poly_class_export/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "// @flow class A { @@ -19,7 +19,7 @@ module.exports = A; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// @flow let A = require('./A'); @@ -46,7 +46,7 @@ module.exports = new B(); " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "// @flow // This test exports a function whose return type is the class's \`this\` type. diff --git a/tests/flow/poly_overload/decls/__snapshots__/jsfmt.spec.js.snap b/tests/flow/poly_overload/decls/__snapshots__/jsfmt.spec.js.snap index 84559bd92..be4a08f3f 100644 --- a/tests/flow/poly_overload/decls/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/poly_overload/decls/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`typescript-deferred.js 1`] = ` +exports[`typescript-deferred.js-flow 1`] = ` "interface Some {} interface Other { x: X; } interface None {} diff --git a/tests/flow/predicates-abstract/__snapshots__/jsfmt.spec.js.snap b/tests/flow/predicates-abstract/__snapshots__/jsfmt.spec.js.snap index 80832bdb6..09b86058d 100644 --- a/tests/flow/predicates-abstract/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/predicates-abstract/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`filter.js 1`] = ` +exports[`filter.js-flow 1`] = ` "// @flow // Filter the contents of an array @@ -34,7 +34,7 @@ function is_string(x): %checks { " `; -exports[`filter-union.js 1`] = ` +exports[`filter-union.js-flow 1`] = ` "// @flow // Filter the contents of an array @@ -75,7 +75,7 @@ declare var ab: Array; " `; -exports[`refine.js 1`] = ` +exports[`refine.js-flow 1`] = ` "// @flow /* @@ -175,7 +175,7 @@ function is_string_and_number(x, y): %checks { " `; -exports[`sanity-filter.js 1`] = ` +exports[`sanity-filter.js-flow 1`] = ` "// @flow declare function my_filter>(v: Array, cb: P): Array<$Refine>; @@ -226,7 +226,7 @@ function is_string_regular(x): boolean { " `; -exports[`sanity-filter-union.js 1`] = ` +exports[`sanity-filter-union.js-flow 1`] = ` "// @flow // Filter the contents of an array @@ -267,7 +267,7 @@ declare var ab: Array; " `; -exports[`sanity-refine.js 1`] = ` +exports[`sanity-refine.js-flow 1`] = ` "// @flow // Sanity check A: the refinment position index is outside of the allowed range diff --git a/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap b/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap index 50dc606cd..b06aa9c53 100644 --- a/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/predicates-declared/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`function-bind.js 1`] = ` +exports[`function-bind.js-flow 1`] = ` "// @flow // Sanity checks: @@ -86,7 +86,7 @@ if (m.bind(this)(x)) { " `; -exports[`function-union.js 1`] = ` +exports[`function-union.js-flow 1`] = ` "// @flow declare function f1(x: mixed): boolean %checks(typeof x === \\"string\\"); @@ -126,7 +126,7 @@ function foo(x: number | string | Array): number { " `; -exports[`is-string-decl.js 1`] = ` +exports[`is-string-decl.js-flow 1`] = ` "// @flow declare function is_string(x: mixed): boolean %checks(typeof x === \\"string\\"); @@ -167,7 +167,7 @@ function foo(x: string | Array): string { " `; -exports[`logical-or.js 1`] = ` +exports[`logical-or.js-flow 1`] = ` "// @flow // Sanity check: @@ -218,7 +218,7 @@ Number(dollars) || 0; " `; -exports[`object-invariant.js 1`] = ` +exports[`object-invariant.js-flow 1`] = ` "// @flow // Sanity check: @@ -270,7 +270,7 @@ function f(_this: { m: ?Meeting }): string { " `; -exports[`orig-string-tag-check.js 1`] = ` +exports[`orig-string-tag-check.js-flow 1`] = ` "// @flow // The original first-order case @@ -298,7 +298,7 @@ function foo(x: string | Array): string { " `; -exports[`sanity-fall-through.js 1`] = ` +exports[`sanity-fall-through.js-flow 1`] = ` "// @flow // Sanity check: @@ -329,7 +329,7 @@ function foo(s: Array): string { " `; -exports[`sanity-invalid-calls.js 1`] = ` +exports[`sanity-invalid-calls.js-flow 1`] = ` "// @flow // Sanity check: @@ -371,7 +371,7 @@ function foo(s: Array): string { " `; -exports[`sanity-is-string-bug.js 1`] = ` +exports[`sanity-is-string-bug.js-flow 1`] = ` "// @flow declare function is_string(x: mixed): boolean %checks(typeof x === \\"string\\"); @@ -406,7 +406,7 @@ function bar(x: string | Array): string { " `; -exports[`sanity-parameter-mismatch.js 1`] = ` +exports[`sanity-parameter-mismatch.js-flow 1`] = ` "// @flow // Sanity check: make sure the parameters are checked as usual @@ -431,7 +431,7 @@ foo(3, 3); " `; -exports[`sanity-pred-with-body.js 1`] = ` +exports[`sanity-pred-with-body.js-flow 1`] = ` "// @flow // Sanity check: @@ -467,7 +467,7 @@ function foo(x: string | Array): string { " `; -exports[`sanity-return-type.js 1`] = ` +exports[`sanity-return-type.js-flow 1`] = ` "// @flow declare function f2(x: mixed): string %checks(Array.isArray(x)); diff --git a/tests/flow/predicates-inferred/__snapshots__/jsfmt.spec.js.snap b/tests/flow/predicates-inferred/__snapshots__/jsfmt.spec.js.snap index 1bc595ec6..2463b319e 100644 --- a/tests/flow/predicates-inferred/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/predicates-inferred/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`sanity.js 1`] = ` +exports[`sanity.js-flow 1`] = ` "// @flow // Sanity check: shouldn't be allowed to declare a predicate AND use \`chekcs\` @@ -59,7 +59,7 @@ function bak(z: string | number): number { " `; -exports[`sanity-multi-params.js 1`] = ` +exports[`sanity-multi-params.js-flow 1`] = ` "// @flow // Feature: multi params @@ -92,7 +92,7 @@ function foo(x: string | Array): string { " `; -exports[`sanity-ordering.js 1`] = ` +exports[`sanity-ordering.js-flow 1`] = ` "// @flow declare var key: string; @@ -133,7 +133,7 @@ function dotAccess(head, create) { " `; -exports[`sanity-unbound-var.js 1`] = ` +exports[`sanity-unbound-var.js-flow 1`] = ` "// @flow declare var y: mixed; @@ -172,7 +172,7 @@ function foo(x: string | Array): string { " `; -exports[`simple-predicate-func.js 1`] = ` +exports[`simple-predicate-func.js-flow 1`] = ` "// @flow function is_string(y): %checks { @@ -323,7 +323,7 @@ declare function from_two_strings(x: string, y: string): void; " `; -exports[`simple-predicate-func-post.js 1`] = ` +exports[`simple-predicate-func-post.js-flow 1`] = ` "// @flow // Feature check: diff --git a/tests/flow/predicates-parsing/__snapshots__/jsfmt.spec.js.snap b/tests/flow/predicates-parsing/__snapshots__/jsfmt.spec.js.snap index c8c934b2a..72ec99477 100644 --- a/tests/flow/predicates-parsing/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/predicates-parsing/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`fail-0.js 1`] = ` +exports[`fail-0.js-flow 1`] = ` "// @flow // Error: 'declare', 'checks' but missing predicate @@ -15,7 +15,7 @@ declare function f2(x: mixed): boolean %checks; " `; -exports[`fail-1.js 1`] = ` +exports[`fail-1.js-flow 1`] = ` "// @flow // Error: no return statement @@ -30,7 +30,7 @@ function f6(x: mixed): %checks(x !== null) {} " `; -exports[`fail-2.js 1`] = ` +exports[`fail-2.js-flow 1`] = ` "// @flow var a2 = (x: mixed): %checks (x !== null) => { // Error: body form @@ -47,7 +47,7 @@ var a2 = (x: mixed): %checks(x !== null) => { " `; -exports[`fail-3.js 1`] = ` +exports[`fail-3.js-flow 1`] = ` "// @flow // Cannot declare predicate with a function body is present. @@ -68,7 +68,7 @@ var a2 = (x: mixed): %checks(x !== null) => x !== null; " `; -exports[`pass.js 1`] = ` +exports[`pass.js-flow 1`] = ` "// @flow declare function f1(x: mixed): boolean; diff --git a/tests/flow/private/__snapshots__/jsfmt.spec.js.snap b/tests/flow/private/__snapshots__/jsfmt.spec.js.snap index 363cb23b2..951836b4c 100644 --- a/tests/flow/private/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/private/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`private.js 1`] = ` +exports[`private.js-flow 1`] = ` "class A { x: number; _x: string; diff --git a/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap b/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap index f2d5f1915..a08e6ad36 100644 --- a/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/promises/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`all.js 1`] = ` +exports[`all.js-flow 1`] = ` "// @flow declare var pstr: Promise; @@ -83,7 +83,7 @@ function tes2(val: Map>) { " `; -exports[`covariance.js 1`] = ` +exports[`covariance.js-flow 1`] = ` "/* @flow */ async function testAll() { @@ -120,7 +120,7 @@ async function testRace() { " `; -exports[`promise.js 1`] = ` +exports[`promise.js-flow 1`] = ` "/** * @flow */ @@ -598,7 +598,7 @@ Promise.resolve(0).catch(function(err) {}).then(function(num) { " `; -exports[`resolve_global.js 1`] = ` +exports[`resolve_global.js-flow 1`] = ` "/** * test Promise name resolution * @flow @@ -685,7 +685,7 @@ async function baz(): Promise { " `; -exports[`resolve_void.js 1`] = ` +exports[`resolve_void.js-flow 1`] = ` "// @flow (Promise.resolve(): Promise); // error diff --git a/tests/flow/pure_component/__snapshots__/jsfmt.spec.js.snap b/tests/flow/pure_component/__snapshots__/jsfmt.spec.js.snap index cbf8baad6..a92fa0e82 100644 --- a/tests/flow/pure_component/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/pure_component/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var React = require('react'); class C extends React.PureComponent { diff --git a/tests/flow/qualified/__snapshots__/jsfmt.spec.js.snap b/tests/flow/qualified/__snapshots__/jsfmt.spec.js.snap index 78ab0f044..1a5cc4eb3 100644 --- a/tests/flow/qualified/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/qualified/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`qualified.js 1`] = ` +exports[`qualified.js-flow 1`] = ` "class C { } var M = { C: C }; diff --git a/tests/flow/react/__snapshots__/jsfmt.spec.js.snap b/tests/flow/react/__snapshots__/jsfmt.spec.js.snap index 5cbf44da0..75e0b808d 100644 --- a/tests/flow/react/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/react/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ArityError.react.js 1`] = ` +exports[`ArityError.react.js-flow 1`] = ` "/** * @providesModule ArityError.react */ @@ -27,7 +27,7 @@ module.exports = AudienceInsightsContainer; " `; -exports[`createElement_string.js 1`] = ` +exports[`createElement_string.js-flow 1`] = ` "// @flow import React from 'react'; @@ -54,7 +54,7 @@ class Foo extends React.Component { " `; -exports[`createElementRequiredProp_string.js 1`] = ` +exports[`createElementRequiredProp_string.js-flow 1`] = ` "// @flow import React from 'react'; @@ -103,7 +103,7 @@ class Foo extends React.Component { " `; -exports[`import_react.js 1`] = ` +exports[`import_react.js-flow 1`] = ` "/* @flow */ import react from \\"react\\"; @@ -122,7 +122,7 @@ var b: number = new react.Component(); // Error: ReactComponent ~> number " `; -exports[`jsx_spread.js 1`] = ` +exports[`jsx_spread.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -149,7 +149,7 @@ var blah = ; // error bar, number given string expected " `; -exports[`proptype_arrayOf.js 1`] = ` +exports[`proptype_arrayOf.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -182,7 +182,7 @@ var fail_mistyped_elems = ; " `; -exports[`proptype_func.js 1`] = ` +exports[`proptype_func.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -215,7 +215,7 @@ var fail_mistyped = ; " `; -exports[`proptype_missing.js 1`] = ` +exports[`proptype_missing.js-flow 1`] = ` "/* @flow */ /* If you create a react component with createClass() but don't specify the @@ -282,7 +282,7 @@ var React = React.createClass({ " `; -exports[`proptype_object.js 1`] = ` +exports[`proptype_object.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -313,7 +313,7 @@ var fail_mistyped = ; " `; -exports[`proptype_objectOf.js 1`] = ` +exports[`proptype_objectOf.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -346,7 +346,7 @@ var fail_mistyped_props = ; " `; -exports[`proptype_oneOf.js 1`] = ` +exports[`proptype_oneOf.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -373,7 +373,7 @@ var ex2 = ; " `; -exports[`proptype_oneOfType.js 1`] = ` +exports[`proptype_oneOfType.js-flow 1`] = ` "/* @flow */ var React = require('react'); diff --git a/tests/flow/react_functional/__snapshots__/jsfmt.spec.js.snap b/tests/flow/react_functional/__snapshots__/jsfmt.spec.js.snap index 6511f9e81..13484c8fd 100644 --- a/tests/flow/react_functional/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/react_functional/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "import React from \\"react\\"; function F(props: { foo: string }) {} diff --git a/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap b/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap index de9496c13..eb28b3b15 100644 --- a/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/react_modules/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`createclass-callsite.js 1`] = ` +exports[`createclass-callsite.js-flow 1`] = ` "/* @flow */ var React = require('react'); var Hello = require('./createclass-module'); @@ -57,7 +57,7 @@ module.exports = Callsite; " `; -exports[`createclass-module.js 1`] = ` +exports[`createclass-module.js-flow 1`] = ` "/* @flow */ var React = require('react'); @@ -90,7 +90,7 @@ module.exports = Hello; " `; -exports[`es6class-types-callsite.js 1`] = ` +exports[`es6class-types-callsite.js-flow 1`] = ` "/* @flow */ import React from 'react'; import Hello from './es6class-types-module'; @@ -147,7 +147,7 @@ module.exports = Callsite; " `; -exports[`es6class-types-module.js 1`] = ` +exports[`es6class-types-module.js-flow 1`] = ` "/* @flow */ import React from 'react'; diff --git a/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap b/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap index 45268ba2f..49cbbc564 100644 --- a/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/rec/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`issue-598.js 1`] = ` +exports[`issue-598.js-flow 1`] = ` "/* @flow */ type F = { foo(x: A): F } @@ -51,7 +51,7 @@ function identity(val: A): Functor { " `; -exports[`issue-1228.js 1`] = ` +exports[`issue-1228.js-flow 1`] = ` "/* @flow */ type Task @@ -75,7 +75,7 @@ function id(x: Task): Task { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class P { x: X; } // this is like Promise type Pstar = X | Pstar>; // this is like Promise* @@ -114,7 +114,7 @@ pstar = (new P(): P>); // OK " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "var a = []; // Array ~> a function bar() { a = a.concat([]); // terminate despite expanding types: @@ -179,7 +179,7 @@ class C extends B {} " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "type I = () => I>; type J = () => J>; @@ -216,14 +216,14 @@ function bar(x: P): () => P { " `; -exports[`test4.js 1`] = ` +exports[`test4.js-flow 1`] = ` "type T = T // cycle in type alias should not cause non-termination ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ type T = T; // cycle in type alias should not cause non-termination " `; -exports[`test5.js 1`] = ` +exports[`test5.js-flow 1`] = ` "/* @flow */ type NestedArray = Array>; diff --git a/tests/flow/recheck-haste/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck-haste/__snapshots__/jsfmt.spec.js.snap index cc86c4f5d..00da8efd1 100644 --- a/tests/flow/recheck-haste/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck-haste/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A1.js 1`] = ` +exports[`A1.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -13,7 +13,7 @@ exports[`A1.js 1`] = ` " `; -exports[`A3.js 1`] = ` +exports[`A3.js-flow 1`] = ` "// @flow require('A'); diff --git a/tests/flow/recheck-haste/tmp1A/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck-haste/tmp1A/__snapshots__/jsfmt.spec.js.snap index f7da4e1fd..0ce9ac8d5 100644 --- a/tests/flow/recheck-haste/tmp1A/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck-haste/tmp1A/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A2.js 1`] = ` +exports[`A2.js-flow 1`] = ` "/** * @providesModule B * @flow diff --git a/tests/flow/recheck-haste/tmp2A/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck-haste/tmp2A/__snapshots__/jsfmt.spec.js.snap index a0752a656..fe991cacd 100644 --- a/tests/flow/recheck-haste/tmp2A/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck-haste/tmp2A/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A3.js 1`] = ` +exports[`A3.js-flow 1`] = ` "// @flow require('B'); diff --git a/tests/flow/recheck/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/__snapshots__/jsfmt.spec.js.snap index 03e960245..cc18b68b7 100644 --- a/tests/flow/recheck/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a1.js 1`] = ` +exports[`a1.js-flow 1`] = ` "// @flow function foo(x: number): string { return 5; } @@ -21,7 +21,7 @@ module.exports = foo; " `; -exports[`a2.js 1`] = ` +exports[`a2.js-flow 1`] = ` "// @flow const foo = require('./a1'); @@ -36,7 +36,7 @@ module.exports = foo(\\"\\"); " `; -exports[`a3.js 1`] = ` +exports[`a3.js-flow 1`] = ` "// @flow const five = require('./a2'); @@ -51,7 +51,7 @@ const five = require(\\"./a2\\"); " `; -exports[`b0.js 1`] = ` +exports[`b0.js-flow 1`] = ` "// @flow class C { x: C; } @@ -72,7 +72,7 @@ module.exports = { C, E }; " `; -exports[`b1.js 1`] = ` +exports[`b1.js-flow 1`] = ` "// @flow import { C, E } from \\"./b0\\"; @@ -99,7 +99,7 @@ module.exports = { C, D }; " `; -exports[`b2.js 1`] = ` +exports[`b2.js-flow 1`] = ` "// @flow module.exports = require(\\"./b1\\"); @@ -110,7 +110,7 @@ module.exports = require(\\"./b1\\"); " `; -exports[`b3.js 1`] = ` +exports[`b3.js-flow 1`] = ` "// @flow import { C, D } from \\"./b2\\"; @@ -125,7 +125,7 @@ import { C, D } from \\"./b2\\"; " `; -exports[`c1.js 1`] = ` +exports[`c1.js-flow 1`] = ` "// @flow export function foo(props: { x: number }) { } @@ -136,7 +136,7 @@ export function foo(props: { x: number }) {} " `; -exports[`c2.js 1`] = ` +exports[`c2.js-flow 1`] = ` "// @flow import { foo } from \\"./c1\\"; @@ -155,7 +155,7 @@ export function bar(props: { x: number }) { " `; -exports[`c3.js 1`] = ` +exports[`c3.js-flow 1`] = ` "// @flow import { bar } from \\"./c2\\"; @@ -170,7 +170,7 @@ bar({ x: 0 }); " `; -exports[`d1.js 1`] = ` +exports[`d1.js-flow 1`] = ` "// @flow export class A {} @@ -185,7 +185,7 @@ export var x = new A(); " `; -exports[`d2.js 1`] = ` +exports[`d2.js-flow 1`] = ` "// @flow import {A, x} from \\"./d1\\"; @@ -198,7 +198,7 @@ export var y: A = x; " `; -exports[`e1.js 1`] = ` +exports[`e1.js-flow 1`] = ` "// @flow export type Action = @@ -216,7 +216,7 @@ export const LIFE = 42; " `; -exports[`e2.js 1`] = ` +exports[`e2.js-flow 1`] = ` "// @flow import type { Action } from './e1'; @@ -243,7 +243,7 @@ import { LIFE } from \\"./e1\\"; " `; -exports[`f1.js 1`] = ` +exports[`f1.js-flow 1`] = ` "// @flow type T = { x: number }; @@ -268,7 +268,7 @@ module.exports = { a, b, c }; " `; -exports[`f2.js 1`] = ` +exports[`f2.js-flow 1`] = ` "// @flow var { a, b, c } = require('./f1'); @@ -281,7 +281,7 @@ var { a, b, c } = require(\\"./f1\\"); " `; -exports[`g1.js 1`] = ` +exports[`g1.js-flow 1`] = ` "// @flow export class C { } @@ -292,7 +292,7 @@ export class C {} " `; -exports[`g2.js 1`] = ` +exports[`g2.js-flow 1`] = ` "// @flow import { C } from './g1'; @@ -311,7 +311,7 @@ module.exports = { D }; " `; -exports[`g3.js 1`] = ` +exports[`g3.js-flow 1`] = ` "// @flow import { C } from './g1'; @@ -328,7 +328,7 @@ import { D } from \\"./g2\\"; " `; -exports[`h1.js 1`] = ` +exports[`h1.js-flow 1`] = ` "// @flow export type Foo = number; @@ -339,7 +339,7 @@ export type Foo = number; " `; -exports[`h2.js 1`] = ` +exports[`h2.js-flow 1`] = ` "// @flow import type { Foo } from './h1'; diff --git a/tests/flow/recheck/tmp1a/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1a/__snapshots__/jsfmt.spec.js.snap index a7bf1066a..22a6e9729 100644 --- a/tests/flow/recheck/tmp1a/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1a/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a1.js 1`] = ` +exports[`a1.js-flow 1`] = ` "// @flow function foo(x: number): number { return 5; } diff --git a/tests/flow/recheck/tmp1b/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1b/__snapshots__/jsfmt.spec.js.snap index 4d9305e86..46f504f7d 100644 --- a/tests/flow/recheck/tmp1b/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1b/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`b1.js 1`] = ` +exports[`b1.js-flow 1`] = ` "// @flow import { C, E } from \\"./b0\\"; diff --git a/tests/flow/recheck/tmp1c/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1c/__snapshots__/jsfmt.spec.js.snap index e04c0c1db..58eed2383 100644 --- a/tests/flow/recheck/tmp1c/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1c/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`c2.js 1`] = ` +exports[`c2.js-flow 1`] = ` "// @flow import { foo } from \\"./c1\\"; diff --git a/tests/flow/recheck/tmp1d/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1d/__snapshots__/jsfmt.spec.js.snap index 0146cfd68..8fa7f3666 100644 --- a/tests/flow/recheck/tmp1d/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1d/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`d1.js 1`] = ` +exports[`d1.js-flow 1`] = ` "// @flow export class A {} diff --git a/tests/flow/recheck/tmp1e/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1e/__snapshots__/jsfmt.spec.js.snap index 338e2c12e..bc9be67f8 100644 --- a/tests/flow/recheck/tmp1e/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1e/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`e2.js 1`] = ` +exports[`e2.js-flow 1`] = ` "// @flow import type { Action } from './e1'; diff --git a/tests/flow/recheck/tmp1f/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1f/__snapshots__/jsfmt.spec.js.snap index 6553b5426..3f905c586 100644 --- a/tests/flow/recheck/tmp1f/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1f/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`f1.js 1`] = ` +exports[`f1.js-flow 1`] = ` "// @flow type T = { x: number }; diff --git a/tests/flow/recheck/tmp1g/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1g/__snapshots__/jsfmt.spec.js.snap index e96b4760d..49f927423 100644 --- a/tests/flow/recheck/tmp1g/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1g/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`g1.js 1`] = ` +exports[`g1.js-flow 1`] = ` "// @flow export class C { } diff --git a/tests/flow/recheck/tmp1h/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp1h/__snapshots__/jsfmt.spec.js.snap index 2a51a4a36..9fb4b44f2 100644 --- a/tests/flow/recheck/tmp1h/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp1h/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`h1.js 1`] = ` +exports[`h1.js-flow 1`] = ` "// @flow export type Bar = number; diff --git a/tests/flow/recheck/tmp2a/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp2a/__snapshots__/jsfmt.spec.js.snap index c5c79c97d..ef2ea1cb0 100644 --- a/tests/flow/recheck/tmp2a/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp2a/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`a1.js 1`] = ` +exports[`a1.js-flow 1`] = ` "// @flow function foo(x: number): number { return 5; } diff --git a/tests/flow/recheck/tmp2b/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp2b/__snapshots__/jsfmt.spec.js.snap index 570b1b193..810de5a2f 100644 --- a/tests/flow/recheck/tmp2b/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp2b/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`b0.js 1`] = ` +exports[`b0.js-flow 1`] = ` "// @flow class C { x: C; } diff --git a/tests/flow/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap index e6791e86d..3da245883 100644 --- a/tests/flow/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`c1.js 1`] = ` +exports[`c1.js-flow 1`] = ` "// @flow export function foo(props: { y: number }) { } diff --git a/tests/flow/recheck/tmp2e/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp2e/__snapshots__/jsfmt.spec.js.snap index 6465844df..3e15c16b9 100644 --- a/tests/flow/recheck/tmp2e/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp2e/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`e1.js 1`] = ` +exports[`e1.js-flow 1`] = ` "// @flow export type Action = diff --git a/tests/flow/recheck/tmp2f/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp2f/__snapshots__/jsfmt.spec.js.snap index 30f154f4d..1e0c104be 100644 --- a/tests/flow/recheck/tmp2f/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp2f/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`f1.js 1`] = ` +exports[`f1.js-flow 1`] = ` "// @flow type T = { x: number }; diff --git a/tests/flow/recheck/tmp3e/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp3e/__snapshots__/jsfmt.spec.js.snap index 4b6f3ecb3..2d8b1660d 100644 --- a/tests/flow/recheck/tmp3e/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp3e/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`e1.js 1`] = ` +exports[`e1.js-flow 1`] = ` "// @flow export type Action = @@ -18,7 +18,7 @@ export const LIFE = 0; " `; -exports[`e2.js 1`] = ` +exports[`e2.js-flow 1`] = ` "// @flow import type { Action } from './e1'; diff --git a/tests/flow/recheck/tmp3f/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp3f/__snapshots__/jsfmt.spec.js.snap index ab6afe322..008719ee9 100644 --- a/tests/flow/recheck/tmp3f/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp3f/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`f1.js 1`] = ` +exports[`f1.js-flow 1`] = ` "// @flow type T = { x: number }; diff --git a/tests/flow/recheck/tmp4f/__snapshots__/jsfmt.spec.js.snap b/tests/flow/recheck/tmp4f/__snapshots__/jsfmt.spec.js.snap index 4e7f58b3d..2de12513d 100644 --- a/tests/flow/recheck/tmp4f/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/recheck/tmp4f/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`f1.js 1`] = ` +exports[`f1.js-flow 1`] = ` "// @flow type T = { x: number }; diff --git a/tests/flow/record/__snapshots__/jsfmt.spec.js.snap b/tests/flow/record/__snapshots__/jsfmt.spec.js.snap index 5a1baaf07..84bc83614 100644 --- a/tests/flow/record/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/record/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type Key1 = 'foo' | 'bar'; // make an enum type with known key set var o1: {[key: Key1]: number} = { foo: 0, diff --git a/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap b/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap index e371d8f01..728eaff9e 100644 --- a/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/refi/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bound.js 1`] = ` +exports[`bound.js-flow 1`] = ` "// refinements of bound vars (closed-over locals) // should have the same lifetimes as heap objects. @@ -134,7 +134,7 @@ var tests = [ " `; -exports[`heap.js 1`] = ` +exports[`heap.js-flow 1`] = ` "var tests = [ function() { @@ -619,7 +619,7 @@ var tests = [ " `; -exports[`lex.js 1`] = ` +exports[`lex.js-flow 1`] = ` "function block_scope(x: string | number) { { let x; @@ -696,7 +696,7 @@ function try_scope_catch(x: string | number) { " `; -exports[`local.js 1`] = ` +exports[`local.js-flow 1`] = ` "var paths = [ function() { @@ -870,7 +870,7 @@ var paths = [ " `; -exports[`null_tests.js 1`] = ` +exports[`null_tests.js-flow 1`] = ` "var null_tests = [ // expr != null @@ -1177,7 +1177,7 @@ class D extends C { " `; -exports[`switch.js 1`] = ` +exports[`switch.js-flow 1`] = ` "// @flow function foo(a,b,c) { switch (c) { @@ -1308,7 +1308,7 @@ function exhaustion3(x): number { " `; -exports[`typeof_tests.js 1`] = ` +exports[`typeof_tests.js-flow 1`] = ` "var null_tests = [ // typeof expr == typename @@ -1570,7 +1570,7 @@ class A { " `; -exports[`undef_tests.js 1`] = ` +exports[`undef_tests.js-flow 1`] = ` "var undef_tests = [ // NOTE: not (yet?) supporting non-strict eq test for undefined @@ -1721,7 +1721,7 @@ class A { " `; -exports[`void_tests.js 1`] = ` +exports[`void_tests.js-flow 1`] = ` "var void_tests = [ // NOTE: not (yet?) supporting non-strict eq test for undefined diff --git a/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap b/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap index 76d1192e6..31320b3d1 100644 --- a/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/refinements/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`assignment.js 1`] = ` +exports[`assignment.js-flow 1`] = ` "/* @flow */ function foo(x : ?number) { @@ -71,7 +71,7 @@ function bar2(x: Bar) { " `; -exports[`ast_node.js 1`] = ` +exports[`ast_node.js-flow 1`] = ` "type Node1 = { kind: 'Node1', prop1?: string @@ -98,7 +98,7 @@ export type ASTNode = Node1 | Node2; " `; -exports[`bool.js 1`] = ` +exports[`bool.js-flow 1`] = ` "/* @flow */ function foo(x: ?bool) { @@ -195,7 +195,7 @@ let tests = [ " `; -exports[`computed_string_literal.js 1`] = ` +exports[`computed_string_literal.js-flow 1`] = ` "// @flow type A = { @@ -238,7 +238,7 @@ function testLiteralProperty(a: A) { " `; -exports[`cond_prop.js 1`] = ` +exports[`cond_prop.js-flow 1`] = ` "/* @flow */ type Type = Name | ListType | NonNullType; @@ -345,7 +345,7 @@ let tests = [ " `; -exports[`constants.js 1`] = ` +exports[`constants.js-flow 1`] = ` "/* @flow */ export const SUCCESS: 'SUCCESS' = 'SUCCESS'; @@ -358,7 +358,7 @@ export const ERROR: \\"ERROR\\" = \\"ERROR\\"; " `; -exports[`eq.js 1`] = ` +exports[`eq.js-flow 1`] = ` "/* @flow */ let tests = [ @@ -414,7 +414,7 @@ let tests = [ " `; -exports[`exists.js 1`] = ` +exports[`exists.js-flow 1`] = ` "declare class Foo { foo: string; } @@ -449,7 +449,7 @@ function foo2(x: ?Class): string { " `; -exports[`func_call.js 1`] = ` +exports[`func_call.js-flow 1`] = ` "// @flow let tests = [ @@ -478,7 +478,7 @@ let tests = [ " `; -exports[`hasOwnProperty.js 1`] = ` +exports[`hasOwnProperty.js-flow 1`] = ` "/* @flow */ function foo(x:{y?:() => void}) { @@ -525,7 +525,7 @@ function bar(x: Object) { " `; -exports[`heap_defassign.js 1`] = ` +exports[`heap_defassign.js-flow 1`] = ` "// @flow type Obj = { p: number | string } @@ -698,7 +698,7 @@ function def_assign_setprop_nohavoc(obj: Obj, obj2: Obj2) { " `; -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "/* @flow */ declare var BAZ: {stuff?: (x: number) => void} | void; @@ -709,7 +709,7 @@ declare var BAZ: { stuff?: (x: number) => void } | void; " `; -exports[`missing-property-cond.js 1`] = ` +exports[`missing-property-cond.js-flow 1`] = ` "// @flow function foo1(o: { x: number }) { @@ -826,7 +826,7 @@ function foo8(o: { p: mixed }) { " `; -exports[`mixed.js 1`] = ` +exports[`mixed.js-flow 1`] = ` "/* @flow */ function takesNumber(x: number) {} @@ -1073,14 +1073,14 @@ function arr0(x: mixed) { " `; -exports[`node1.js 1`] = ` +exports[`node1.js-flow 1`] = ` "module.exports = 'Node1'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ module.exports = \\"Node1\\"; " `; -exports[`not.js 1`] = ` +exports[`not.js-flow 1`] = ` "/* @flow */ function foo(x: ?bool) { @@ -1189,7 +1189,7 @@ let tests = [ " `; -exports[`null.js 1`] = ` +exports[`null.js-flow 1`] = ` "/* @flow */ function null_bogus_comparison() { @@ -1214,7 +1214,7 @@ function null_bogus_comparison() { " `; -exports[`number.js 1`] = ` +exports[`number.js-flow 1`] = ` "// @flow type Mode = 0 | 1 | 2; @@ -1461,7 +1461,7 @@ let tests = [ " `; -exports[`property.js 1`] = ` +exports[`property.js-flow 1`] = ` "/* @flow */ function a(x: {[key: string]: ?string}, y: string): string { @@ -1633,7 +1633,7 @@ function c3( " `; -exports[`refinements.js 1`] = ` +exports[`refinements.js-flow 1`] = ` "function foo(b) { var x = b? 0 : null; while (typeof x == \\"string\\" || typeof x == \\"number\\") { @@ -1796,7 +1796,7 @@ function global_in_conditional2(x: number) { " `; -exports[`string.js 1`] = ` +exports[`string.js-flow 1`] = ` "// @flow type Mode = \\"a\\" | \\"b\\" | \\"c\\"; @@ -2069,7 +2069,7 @@ let tests = [ " `; -exports[`super_member.js 1`] = ` +exports[`super_member.js-flow 1`] = ` "/* @flow */ class A { @@ -2127,7 +2127,7 @@ class C extends A { " `; -exports[`switch.js 1`] = ` +exports[`switch.js-flow 1`] = ` "/* @flow */ function foo(text: string | number): string { @@ -2237,7 +2237,7 @@ function corge(text: string | number | Array): string { " `; -exports[`tagged_union.js 1`] = ` +exports[`tagged_union.js-flow 1`] = ` "// example 1 type Type = Name | ListType; @@ -2734,7 +2734,7 @@ let tests = [ " `; -exports[`tagged_union_import.js 1`] = ` +exports[`tagged_union_import.js-flow 1`] = ` "/* @flow */ import { SUCCESS, ERROR } from './constants' @@ -2785,7 +2785,7 @@ function handleStatus(status: Success | Error) { " `; -exports[`typeof.js 1`] = ` +exports[`typeof.js-flow 1`] = ` "/* @flow */ function foo(x: bool | number) { @@ -2918,7 +2918,7 @@ function testInvalidTemplateLiteral(x: string | number) { " `; -exports[`undef.js 1`] = ` +exports[`undef.js-flow 1`] = ` "/* @flow */ function undef_var(x: ?number) { @@ -3083,7 +3083,7 @@ function undef_bogus_comparison() { " `; -exports[`union.js 1`] = ` +exports[`union.js-flow 1`] = ` "/* @flow */ type thing = number | bool @@ -3130,7 +3130,7 @@ function baz(x: ?thing) { " `; -exports[`void.js 1`] = ` +exports[`void.js-flow 1`] = ` "/* @flow */ function void_var(x: ?number) { diff --git a/tests/flow/reflection/__snapshots__/jsfmt.spec.js.snap b/tests/flow/reflection/__snapshots__/jsfmt.spec.js.snap index d12812a68..5e0f02d5b 100644 --- a/tests/flow/reflection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/reflection/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`type.js 1`] = ` +exports[`type.js-flow 1`] = ` "declare var a: number; var b: typeof a = \\"...\\"; var c: typeof a = \\"...\\"; diff --git a/tests/flow/regexp/__snapshots__/jsfmt.spec.js.snap b/tests/flow/regexp/__snapshots__/jsfmt.spec.js.snap index e4cca008c..f91d328e2 100644 --- a/tests/flow/regexp/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/regexp/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`regexp.js 1`] = ` +exports[`regexp.js-flow 1`] = ` "var patt=/Hello/g var match:number = patt.test(\\"Hello world!\\"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/replace/__snapshots__/jsfmt.spec.js.snap b/tests/flow/replace/__snapshots__/jsfmt.spec.js.snap index 097f768c4..1ae8c6c70 100644 --- a/tests/flow/replace/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/replace/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var a = 0; function foo(x) { } diff --git a/tests/flow/require/__snapshots__/jsfmt.spec.js.snap b/tests/flow/require/__snapshots__/jsfmt.spec.js.snap index 55c09fecf..7c902580b 100644 --- a/tests/flow/require/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/require/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/* @flow */ exports.numberValue = 42; @@ -11,14 +11,14 @@ exports.numberValue = 42; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "/* @flow */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* @flow */ " `; -exports[`E.js 1`] = ` +exports[`E.js-flow 1`] = ` "/* @flow */ // Local \`exports\` var is just a ref to module.exports, so mutating the original @@ -43,7 +43,7 @@ exports = { stringValue: \\"\\" }; " `; -exports[`ProvidesModuleA.js 1`] = ` +exports[`ProvidesModuleA.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -60,7 +60,7 @@ exports.numberValue = 42; " `; -exports[`ProvidesModuleD.js 1`] = ` +exports[`ProvidesModuleD.js-flow 1`] = ` "/** * @providesModule D * @flow @@ -73,7 +73,7 @@ exports[`ProvidesModuleD.js 1`] = ` " `; -exports[`not_builtin_require.js 1`] = ` +exports[`not_builtin_require.js-flow 1`] = ` "// @flow function require() {} @@ -86,7 +86,7 @@ require(\\"not a module name\\"); " `; -exports[`not_builtin_require2.js 1`] = ` +exports[`not_builtin_require2.js-flow 1`] = ` "// @flow type require = number; @@ -99,7 +99,7 @@ var a: require = 42; " `; -exports[`require.js 1`] = ` +exports[`require.js-flow 1`] = ` "/* @flow */ function takesANumber(num: number): void {} diff --git a/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap b/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap index 153913e9b..3a43c8eae 100644 --- a/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/requireLazy/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/** * @providesModule A * @flow @@ -23,7 +23,7 @@ module.exports = { " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/** * @providesModule B * @flow @@ -46,7 +46,7 @@ module.exports = { " `; -exports[`requireLazy.js 1`] = ` +exports[`requireLazy.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/return/__snapshots__/jsfmt.spec.js.snap b/tests/flow/return/__snapshots__/jsfmt.spec.js.snap index e9aba62c7..3cfe77994 100644 --- a/tests/flow/return/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/return/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`function_return.js 1`] = ` +exports[`function_return.js-flow 1`] = ` "class C { foo() { } bar() { return; } @@ -81,7 +81,7 @@ module.exports = C; " `; -exports[`void.js 1`] = ` +exports[`void.js-flow 1`] = ` "/* This is a regression test. At one point we incorrectly inferred the return type of functions that have an explicit \`undefined\` to be only \`undefined\` -- ignoring other possible exits. */ diff --git a/tests/flow/return_new/__snapshots__/jsfmt.spec.js.snap b/tests/flow/return_new/__snapshots__/jsfmt.spec.js.snap index de09bf616..c70aa241a 100644 --- a/tests/flow/return_new/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/return_new/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "function Foo() { return {}; } var foo: number = new Foo(); // error (returns object literal above) @@ -35,7 +35,7 @@ var a: A = new B(); // OK (returns new A) " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "declare class D { constructor(): { x: number }; // OK y: any; diff --git a/tests/flow/seal/__snapshots__/jsfmt.spec.js.snap b/tests/flow/seal/__snapshots__/jsfmt.spec.js.snap index 67d693186..759478623 100644 --- a/tests/flow/seal/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/seal/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`imp.js 1`] = ` +exports[`imp.js-flow 1`] = ` "/* @flow */ var imp = require('./obj_annot'); @@ -13,7 +13,7 @@ imp({ name: \\"imp\\" }); " `; -exports[`obj_annot.js 1`] = ` +exports[`obj_annot.js-flow 1`] = ` "/* @flow */ function foo(param: { name: string; }): number { diff --git a/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap b/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap index 35e160759..15417b684 100644 --- a/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/sealed/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`function.js 1`] = ` +exports[`function.js-flow 1`] = ` "/* @flow */ function Bar(x: number) { @@ -27,7 +27,7 @@ module.exports = Bar; " `; -exports[`proto.js 1`] = ` +exports[`proto.js-flow 1`] = ` "function Foo() { } var o = new Foo(); var x:number = o.x; @@ -66,7 +66,7 @@ module.exports = export_o; " `; -exports[`sealed.js 1`] = ` +exports[`sealed.js-flow 1`] = ` "var o = require('./proto'); o.z = 0; diff --git a/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap b/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap index 167bc1be8..2380f2906 100644 --- a/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/sealed_objects/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var o1 = { x: 0 }; var s1: string = o1.y; // error diff --git a/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap b/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap index 3931e96c1..a54b25b0b 100644 --- a/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/shape/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type Foo = { field: number, } diff --git a/tests/flow/simple_arrays/__snapshots__/jsfmt.spec.js.snap b/tests/flow/simple_arrays/__snapshots__/jsfmt.spec.js.snap index 8a7650872..d8e67d32b 100644 --- a/tests/flow/simple_arrays/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/simple_arrays/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array.js 1`] = ` +exports[`array.js-flow 1`] = ` "/* @flow */ var a = []; for (var i = 0; i < 10; ++i) { @@ -54,7 +54,7 @@ function baz(i: number): string { " `; -exports[`array2.js 1`] = ` +exports[`array2.js-flow 1`] = ` "/* @flow */ var a = []; for (var i = 0; i < 10; ++i) { diff --git a/tests/flow/singleton/__snapshots__/jsfmt.spec.js.snap b/tests/flow/singleton/__snapshots__/jsfmt.spec.js.snap index 5e59ed37f..225c4074a 100644 --- a/tests/flow/singleton/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/singleton/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`boolean.js 1`] = ` +exports[`boolean.js-flow 1`] = ` "/* @flow */ function veryOptimistic(isThisAwesome: true): boolean { @@ -79,7 +79,7 @@ function alwaysFalsy(x: boolean): false { " `; -exports[`number.js 1`] = ` +exports[`number.js-flow 1`] = ` "/* @flow */ function highlander(howMany: 1): number { @@ -129,7 +129,7 @@ sort((x, y) => -1); " `; -exports[`string.js 1`] = ` +exports[`string.js-flow 1`] = ` "/* @flow */ type NoSpaces = \\"foobar\\" diff --git a/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap b/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap index d71f81b74..9125ecdd2 100644 --- a/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/spread/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "function parseTimestamp(timestamp: string): number { return 0; } @@ -67,7 +67,7 @@ function parseTimeframe(line: string): { begin: number, end: number } { " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "/** * @flow */ @@ -90,7 +90,7 @@ foo({ foo: 42 }); " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "var p = { y: \\"\\" }; var q = { z: \\"\\" }; var o = { @@ -129,7 +129,7 @@ var t: boolean = s.y; // error, string or number " `; -exports[`test4.js 1`] = ` +exports[`test4.js-flow 1`] = ` "/* @flow */ function test(...nums: Array) {} @@ -142,7 +142,7 @@ test(0, ...[1, 2, 3]); " `; -exports[`test5.js 1`] = ` +exports[`test5.js-flow 1`] = ` "/* @flow */ declare function map( @@ -197,7 +197,7 @@ function test( " `; -exports[`test6.js 1`] = ` +exports[`test6.js-flow 1`] = ` "var o = { foo: 'bar' }; @@ -242,7 +242,7 @@ for (var i = 0; i < 10; i++) { " `; -exports[`test7.js 1`] = ` +exports[`test7.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/static_overload/__snapshots__/jsfmt.spec.js.snap b/tests/flow/static_overload/__snapshots__/jsfmt.spec.js.snap index 4c45c87f0..2cf37727b 100644 --- a/tests/flow/static_overload/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/static_overload/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var x: number = StaticOverload.foo(0); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var x: number = StaticOverload.foo(0); diff --git a/tests/flow/static_overload/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/static_overload/lib/__snapshots__/jsfmt.spec.js.snap index e35773db9..a5b6da257 100644 --- a/tests/flow/static_overload/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/static_overload/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare class StaticOverload { static foo(x: number): number; static foo(x: string): string; diff --git a/tests/flow/statics/__snapshots__/jsfmt.spec.js.snap b/tests/flow/statics/__snapshots__/jsfmt.spec.js.snap index 32ee59fab..213a6f67e 100644 --- a/tests/flow/statics/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/statics/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class_statics.js 1`] = ` +exports[`class_statics.js-flow 1`] = ` "class C { static f(x:number) { } static x:string; @@ -26,7 +26,7 @@ C.x = 0; " `; -exports[`funstatics.js 1`] = ` +exports[`funstatics.js-flow 1`] = ` "function C() { } C.prototype.f = function() { return C.g(0); } C.g = function(x) { return x; }; diff --git a/tests/flow/strict/__snapshots__/jsfmt.spec.js.snap b/tests/flow/strict/__snapshots__/jsfmt.spec.js.snap index 5467e378c..806da2547 100644 --- a/tests/flow/strict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/strict/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`annot.js 1`] = ` +exports[`annot.js-flow 1`] = ` "var A = require('./unknown_class'); class B extends A { @@ -27,7 +27,7 @@ module.exports = B; " `; -exports[`fun.js 1`] = ` +exports[`fun.js-flow 1`] = ` "/** * @flow */ @@ -60,7 +60,7 @@ module.exports = f; " `; -exports[`obj.js 1`] = ` +exports[`obj.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap b/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap index 26b6e55c8..e141cab57 100644 --- a/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/strict_requires/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/* @flow */ module.exports = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ module.exports = 0; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "/* @flow */ module.exports = { foo: \\"\\" } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -18,7 +18,7 @@ module.exports = { foo: \\"\\" }; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "/* @flow */ var o = { A: require('./A'), @@ -35,7 +35,7 @@ module.exports = o; " `; -exports[`D.js 1`] = ` +exports[`D.js-flow 1`] = ` "/* @flow */ var C = require('./C'); var x: number = C.foo; diff --git a/tests/flow/structural_subtyping/__snapshots__/jsfmt.spec.js.snap b/tests/flow/structural_subtyping/__snapshots__/jsfmt.spec.js.snap index 5a351643d..f5ea86dd4 100644 --- a/tests/flow/structural_subtyping/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/structural_subtyping/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`builtin.js 1`] = ` +exports[`builtin.js-flow 1`] = ` "/** * @flow */ @@ -29,7 +29,7 @@ var lengthTest4: IHasLength = true; // bool doesn't have length " `; -exports[`class.js 1`] = ` +exports[`class.js-flow 1`] = ` "/** * @flow */ @@ -80,7 +80,7 @@ var testInstance3: IHasYString = new ClassWithXString(); // Error missing prop " `; -exports[`obj.js 1`] = ` +exports[`obj.js-flow 1`] = ` "/** * @flow */ @@ -125,7 +125,7 @@ function propTest6(y: { [key: string]: number }) { " `; -exports[`optional.js 1`] = ` +exports[`optional.js-flow 1`] = ` "/* @flow */ interface HasOptional { diff --git a/tests/flow/suggest/__snapshots__/jsfmt.spec.js.snap b/tests/flow/suggest/__snapshots__/jsfmt.spec.js.snap index dae74cf93..68c31159c 100644 --- a/tests/flow/suggest/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/suggest/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "/* @flow */ function bar(w: number): number { return w; } @@ -17,7 +17,7 @@ module.exports = bar; " `; -exports[`suggest.js 1`] = ` +exports[`suggest.js-flow 1`] = ` "/* @flow */ var bar = require('./lib'); diff --git a/tests/flow/super/__snapshots__/jsfmt.spec.js.snap b/tests/flow/super/__snapshots__/jsfmt.spec.js.snap index fb64d97a5..baf7facda 100644 --- a/tests/flow/super/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/super/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`constructor.js 1`] = ` +exports[`constructor.js-flow 1`] = ` "class A { x: number; } class B { @@ -315,7 +315,7 @@ class N extends N_ { " `; -exports[`import.js 1`] = ` +exports[`import.js-flow 1`] = ` "class D { foo(): number { return 0; } } @@ -330,7 +330,7 @@ module.exports = D; " `; -exports[`super.js 1`] = ` +exports[`super.js-flow 1`] = ` " class A { constructor(x:number) { } @@ -380,7 +380,7 @@ class B extends A { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var D = require('./import'); class C extends D { constructor() { return super(); } diff --git a/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap b/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap index 62a5e1825..73e4b4611 100644 --- a/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/suppress/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "// $FlowFixMe var test1: string = 123; // This error should be suppressed @@ -53,7 +53,7 @@ var test6: string = 123; " `; -exports[`B.js 1`] = ` +exports[`B.js-flow 1`] = ` "// $FlowFixMe var test1: string = library_num; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -62,7 +62,7 @@ var test1: string = library_num; " `; -exports[`C.js 1`] = ` +exports[`C.js-flow 1`] = ` "function takesAString(x: string): void {} function runTest(y: number): void { @@ -83,7 +83,7 @@ function runTest(y: number): void { " `; -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare var library_num: number; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare var library_num: number; diff --git a/tests/flow/suppress_incremental/__snapshots__/jsfmt.spec.js.snap b/tests/flow/suppress_incremental/__snapshots__/jsfmt.spec.js.snap index a1f78c9b3..1be19d9fb 100644 --- a/tests/flow/suppress_incremental/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/suppress_incremental/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow (123: number); // no errors diff --git a/tests/flow/suppress_traces/__snapshots__/jsfmt.spec.js.snap b/tests/flow/suppress_traces/__snapshots__/jsfmt.spec.js.snap index 2c91ea6bc..1be20bc25 100644 --- a/tests/flow/suppress_traces/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/suppress_traces/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`traces.js 1`] = ` +exports[`traces.js-flow 1`] = ` "/* * The location marked with the FlowFixMe does not show up in the original * error but shows up in the flow check --traces 10 result. This test makes diff --git a/tests/flow/switch/__snapshots__/jsfmt.spec.js.snap b/tests/flow/switch/__snapshots__/jsfmt.spec.js.snap index 23d0e5c99..60991baf2 100644 --- a/tests/flow/switch/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/switch/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`more_switch.js 1`] = ` +exports[`more_switch.js-flow 1`] = ` "/* @flow */ function foo(x): number { @@ -64,7 +64,7 @@ function baz(x): number { " `; -exports[`switch.js 1`] = ` +exports[`switch.js-flow 1`] = ` "/** * @flow */ @@ -128,7 +128,7 @@ function qux(b) { " `; -exports[`switch_default_fallthrough.js 1`] = ` +exports[`switch_default_fallthrough.js-flow 1`] = ` "/** * @flow */ @@ -227,7 +227,7 @@ function baz(x: mixed): number { " `; -exports[`trailing_cases.js 1`] = ` +exports[`trailing_cases.js-flow 1`] = ` "/** * trailing cases are allowed - spot checks that we handle them as usual * @flow diff --git a/tests/flow/symbol/__snapshots__/jsfmt.spec.js.snap b/tests/flow/symbol/__snapshots__/jsfmt.spec.js.snap index f5c0c0683..9bb166c7e 100644 --- a/tests/flow/symbol/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/symbol/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`symbol.js 1`] = ` +exports[`symbol.js-flow 1`] = ` "var FOO = Symbol(); var BAR = Symbol('bar'); diff --git a/tests/flow/symlink/__snapshots__/jsfmt.spec.js.snap b/tests/flow/symlink/__snapshots__/jsfmt.spec.js.snap index d1f261a36..9e7358312 100644 --- a/tests/flow/symlink/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/symlink/__snapshots__/jsfmt.spec.js.snap @@ -1,20 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bar.js 1`] = ` +exports[`bar.js-flow 1`] = ` "export type Foo = { x: number; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export type Foo = { x: number }; " `; -exports[`foo.js 1`] = ` +exports[`foo.js-flow 1`] = ` "export type Foo = { x: number; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export type Foo = { x: number }; " `; -exports[`qux.js 1`] = ` +exports[`qux.js-flow 1`] = ` "import type { Foo } from './bar.js'; ({ x: \\"\\" }: Foo); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap b/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap index d83426a02..34d6f474e 100644 --- a/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/tagged-unions/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`classes.js 1`] = ` +exports[`classes.js-flow 1`] = ` "// @flow class Foo { @@ -67,7 +67,7 @@ function bar(x: Bar): string { " `; -exports[`interfaces-neg.js 1`] = ` +exports[`interfaces-neg.js-flow 1`] = ` "/* @flow */ declare interface IDataBase { @@ -124,7 +124,7 @@ if (data.kind === \\"user\\") { " `; -exports[`interfaces-pos.js 1`] = ` +exports[`interfaces-pos.js-flow 1`] = ` "/* @flow */ declare interface IDataBase { @@ -181,7 +181,7 @@ if (data.kind === \\"system\\") { " `; -exports[`type-decls-neg.js 1`] = ` +exports[`type-decls-neg.js-flow 1`] = ` "/* @flow */ type DataBase = { @@ -246,7 +246,7 @@ if (data.kind === \\"user\\") { " `; -exports[`type-decls-pos.js 1`] = ` +exports[`type-decls-pos.js-flow 1`] = ` "/* @flow */ type DataBase = { diff --git a/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap b/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap index 8dd7bb748..c45c7704e 100644 --- a/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/taint/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`adder.js 1`] = ` +exports[`adder.js-flow 1`] = ` "// @flow function f(x : $Tainted, y : $Tainted) { @@ -67,7 +67,7 @@ function f7(x: $Tainted, y: $Tainted) { " `; -exports[`any_object.js 1`] = ` +exports[`any_object.js-flow 1`] = ` "// @flow let tests = [ @@ -122,7 +122,7 @@ let tests = [ " `; -exports[`call-object-property.js 1`] = ` +exports[`call-object-property.js-flow 1`] = ` "// @flow function foo(x : $Tainted, o : Object) { @@ -177,7 +177,7 @@ function f_foo3(f1: Function, o1: Object, o2: { t: $Tainted }) { " `; -exports[`comparator.js 1`] = ` +exports[`comparator.js-flow 1`] = ` "// @flow // Should cause an error. function f(x : $Tainted, y : $Tainted) { @@ -218,7 +218,7 @@ function f3(x: $Tainted, y: string) { " `; -exports[`function.js 1`] = ` +exports[`function.js-flow 1`] = ` "// @flow let tests = [ @@ -251,7 +251,7 @@ let tests = [ " `; -exports[`globals.js 1`] = ` +exports[`globals.js-flow 1`] = ` "// @flow class A { @@ -280,7 +280,7 @@ class A { " `; -exports[`lib.js 1`] = ` +exports[`lib.js-flow 1`] = ` "declare class FakeLocation { assign(url: string): void; } @@ -309,7 +309,7 @@ declare var fakeLocation: FakeLocation; " `; -exports[`taint1.js 1`] = ` +exports[`taint1.js-flow 1`] = ` "/* * * @flow @@ -334,7 +334,7 @@ class A { " `; -exports[`taint2.js 1`] = ` +exports[`taint2.js-flow 1`] = ` "/* * * @flow @@ -359,7 +359,7 @@ class A { " `; -exports[`taint3.js 1`] = ` +exports[`taint3.js-flow 1`] = ` "/* * * @flow @@ -388,7 +388,7 @@ class A { " `; -exports[`taint4.js 1`] = ` +exports[`taint4.js-flow 1`] = ` "/* * * @flow @@ -419,7 +419,7 @@ function f(x: $Tainted) { " `; -exports[`use-types.js 1`] = ` +exports[`use-types.js-flow 1`] = ` "/* * @flow */ diff --git a/tests/flow/template/__snapshots__/jsfmt.spec.js.snap b/tests/flow/template/__snapshots__/jsfmt.spec.js.snap index e5055b8c3..8360940f4 100644 --- a/tests/flow/template/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/template/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`template.js 1`] = ` +exports[`template.js-flow 1`] = ` "/* @flow */ (\`foo\`: string); // ok diff --git a/tests/flow/this/__snapshots__/jsfmt.spec.js.snap b/tests/flow/this/__snapshots__/jsfmt.spec.js.snap index f7a61987b..a2edc5234 100644 --- a/tests/flow/this/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/this/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`This.js 1`] = ` +exports[`This.js-flow 1`] = ` "/* @providesModule This */ function F() { this.x = 0; } @@ -131,7 +131,7 @@ module.exports = true; " `; -exports[`arrows.js 1`] = ` +exports[`arrows.js-flow 1`] = ` "class C { foo() { return () => { return this.bar(); }; // OK, since this: C diff --git a/tests/flow/this_ctor/__snapshots__/jsfmt.spec.js.snap b/tests/flow/this_ctor/__snapshots__/jsfmt.spec.js.snap index 5b8bde356..10d709442 100644 --- a/tests/flow/this_ctor/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/this_ctor/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class A { n: number; constructor(n: number) { diff --git a/tests/flow/this_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow/this_type/__snapshots__/jsfmt.spec.js.snap index aa3f60edf..f49251c59 100644 --- a/tests/flow/this_type/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/this_type/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class_expr.js 1`] = ` +exports[`class_expr.js-flow 1`] = ` "/* @flow */ // issue #1191 @@ -21,7 +21,7 @@ const Thing = class Thing { " `; -exports[`contra.js 1`] = ` +exports[`contra.js-flow 1`] = ` "// Counterexample with contravariant this type class C { @@ -142,7 +142,7 @@ class Misc { " `; -exports[`export.js 1`] = ` +exports[`export.js-flow 1`] = ` "export class A1 { foo(): this { return this; } bar(): this { return this; } @@ -181,7 +181,7 @@ export class A3 extends A2 {} " `; -exports[`generics.js 1`] = ` +exports[`generics.js-flow 1`] = ` "class Generic { clone(): Generic { return this; } } @@ -209,7 +209,7 @@ class ImplicitNumber extends Implicit { " `; -exports[`import.js 1`] = ` +exports[`import.js-flow 1`] = ` "// Check that imports are handled properly with this types import { A1 } from './export'; @@ -262,7 +262,7 @@ class B3 extends A3 { " `; -exports[`interface.js 1`] = ` +exports[`interface.js-flow 1`] = ` "interface I { xs: Array; } interface J { f(): J; } class C { @@ -289,7 +289,7 @@ function bar(c: C): J { " `; -exports[`lib_client.js 1`] = ` +exports[`lib_client.js-flow 1`] = ` "(new DoublyLinkedList().prev(): DoublyLinkedList); (new DoublyLinkedList().next(): DoublyLinkedList) @@ -314,7 +314,7 @@ class C { " `; -exports[`self.js 1`] = ` +exports[`self.js-flow 1`] = ` "class A { foo() { return this; } // return of foo is not annotated to get around // substituting this below @@ -337,7 +337,7 @@ class A { " `; -exports[`statics.js 1`] = ` +exports[`statics.js-flow 1`] = ` "// supporting \`this\` type in statics class A { @@ -377,7 +377,7 @@ class B extends A {} // inherits statics method too, with \`this\` bound to the " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// Examples without \`this\` types (compare with examples below) class Base { diff --git a/tests/flow/this_type/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/this_type/lib/__snapshots__/jsfmt.spec.js.snap index 9c1e4860e..a7c306902 100644 --- a/tests/flow/this_type/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/this_type/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`decl.js 1`] = ` +exports[`decl.js-flow 1`] = ` "// The following declare classes use \`this\` types effectively to avoid type // errors in ../lib_client.js. If support for \`this\` types in declare classes // is disabled for perf reasons, these will produce warnings. diff --git a/tests/flow/throw/__snapshots__/jsfmt.spec.js.snap b/tests/flow/throw/__snapshots__/jsfmt.spec.js.snap index 04dc73905..d65cc0893 100644 --- a/tests/flow/throw/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/throw/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap b/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap index c0561d937..bc0791d4b 100644 --- a/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/traces/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Traces.js 1`] = ` +exports[`Traces.js-flow 1`] = ` "// arg/param type mismatch on arg 0 function g0(y:string) { } function f0(x) { g0(x) } @@ -57,7 +57,7 @@ f3(double); " `; -exports[`Traces2.js 1`] = ` +exports[`Traces2.js-flow 1`] = ` "// @flow var React = require('react'); diff --git a/tests/flow/traits/__snapshots__/jsfmt.spec.js.snap b/tests/flow/traits/__snapshots__/jsfmt.spec.js.snap index 3c2167656..3db5c5542 100644 --- a/tests/flow/traits/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/traits/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "declare class Foo extends Qux mixins Bar { // KeyedCollection <: Collection // ...KeyedIterable @@ -46,7 +46,7 @@ declare class Baz { " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "declare interface I { } declare class C mixins I { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/flow/try/__snapshots__/jsfmt.spec.js.snap b/tests/flow/try/__snapshots__/jsfmt.spec.js.snap index 8004b0399..16f5174d3 100644 --- a/tests/flow/try/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/try/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`abnormals.js 1`] = ` +exports[`abnormals.js-flow 1`] = ` "/* @flow */ /* This test documents an issue we used to have with merging the environment of @@ -35,7 +35,7 @@ function foo() { " `; -exports[`init.js 1`] = ` +exports[`init.js-flow 1`] = ` "/*** * test initialization tracking of hoisted stuff * @flow @@ -344,7 +344,7 @@ function f(b) { " `; -exports[`return.js 1`] = ` +exports[`return.js-flow 1`] = ` "/** * @flow */ @@ -477,7 +477,7 @@ function corge(): string { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/*** * test env state tracking thru try/catch/finally * @flow diff --git a/tests/flow/tuples/__snapshots__/jsfmt.spec.js.snap b/tests/flow/tuples/__snapshots__/jsfmt.spec.js.snap index ad8242a2a..d60252c52 100644 --- a/tests/flow/tuples/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/tuples/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`array.js 1`] = ` +exports[`array.js-flow 1`] = ` "// @flow function foo(x: Array): [number, ?number] { @@ -23,7 +23,7 @@ function foo(x: Array): [number, ?number] { " `; -exports[`optional.js 1`] = ` +exports[`optional.js-flow 1`] = ` "// @flow ([0, undefined]: [number, ?string]); // Ok, correct arity @@ -40,7 +40,7 @@ exports[`optional.js 1`] = ` " `; -exports[`too-few.js 1`] = ` +exports[`too-few.js-flow 1`] = ` "/* @flow */ function foo(a: [Object, Object]) {} @@ -55,7 +55,7 @@ foo([{}]); // error, too few elements in array passed to a tuple " `; -exports[`tuples.js 1`] = ` +exports[`tuples.js-flow 1`] = ` "var a: [] = []; var b: [] = [123]; // Error - arity mismatch var c: [number] = []; // nope diff --git a/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap index 84dd2b203..1557a6731 100644 --- a/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type-at-pos/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`destructuring.js 1`] = ` +exports[`destructuring.js-flow 1`] = ` "// @flow let [x, y] = [1, 2]; @@ -43,7 +43,7 @@ export const X = { " `; -exports[`function_expressions.js 1`] = ` +exports[`function_expressions.js-flow 1`] = ` "// @flow // TODO: type-at-pos between the ()'s should be () => void @@ -68,7 +68,7 @@ const y = { " `; -exports[`generics.js 1`] = ` +exports[`generics.js-flow 1`] = ` "// @flow class C { } @@ -127,7 +127,7 @@ mn; " `; -exports[`import.js 1`] = ` +exports[`import.js-flow 1`] = ` "// @flow var num = 42; function bar() { } @@ -142,7 +142,7 @@ module.exports = num; " `; -exports[`object_special_cases.js 1`] = ` +exports[`object_special_cases.js-flow 1`] = ` "/* @flow */ let tests = [ @@ -163,7 +163,7 @@ let tests = [ " `; -exports[`optional.js 1`] = ` +exports[`optional.js-flow 1`] = ` "// @flow function foo(x?: string) { @@ -198,7 +198,7 @@ function qux(x?) { " `; -exports[`predicates.js 1`] = ` +exports[`predicates.js-flow 1`] = ` "/* @flow */ let x = 0; @@ -218,7 +218,7 @@ if (Array.isArray(x)) { " `; -exports[`react.js 1`] = ` +exports[`react.js-flow 1`] = ` "import React from \\"react\\"; React.createElement; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -227,7 +227,7 @@ React.createElement; " `; -exports[`templates.js 1`] = ` +exports[`templates.js-flow 1`] = ` "/* @flow */ \`foo bar\`; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -236,7 +236,7 @@ exports[`templates.js 1`] = ` " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow var str = require('./import'); function foo() { } @@ -269,7 +269,7 @@ const w: MyNum = 42; " `; -exports[`trycatch.js 1`] = ` +exports[`trycatch.js-flow 1`] = ` "// @flow try { diff --git a/tests/flow/type-destructors/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-destructors/__snapshots__/jsfmt.spec.js.snap index 81bf2922a..1fe4997cd 100644 --- a/tests/flow/type-destructors/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type-destructors/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`non_maybe_type.js 1`] = ` +exports[`non_maybe_type.js-flow 1`] = ` "// @flow function foo(x: ?string): $NonMaybeType { @@ -30,7 +30,7 @@ function foo(x: ?string): $NonMaybeType { " `; -exports[`property_type.js 1`] = ` +exports[`property_type.js-flow 1`] = ` "type Malformed = $PropertyType; type Obj = { x: string }; @@ -57,7 +57,7 @@ function foo(o: Obj): $PropertyType { " `; -exports[`union.js 1`] = ` +exports[`union.js-flow 1`] = ` "var x0: $NonMaybeType = 0; // ok, number ~> number|string var x1: $NonMaybeType = true; // err, boolean ~> number|string var x2: $PropertyType<{p:number}|{p:string},'p'> = 0; // ok, number ~> number|string diff --git a/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap index 235c4fd71..24828c7b4 100644 --- a/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type-printer/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`printBinaryExpression.js 1`] = ` +exports[`printBinaryExpression.js-flow 1`] = ` "'use babel'; /* @flow */ @@ -43,7 +43,7 @@ module.exports = printBinaryExpression; " `; -exports[`types.js 1`] = ` +exports[`types.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap index 7c6d8407f..efa0f475f 100644 --- a/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_args_nonstrict/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * Test nonstrict type param arity checking, * as enabled by diff --git a/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap index 120231d4b..e18476559 100644 --- a/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_args_strict/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * Test strict type param arity checking. * diff --git a/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap index 83e83b752..273bf10b1 100644 --- a/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_only_vars/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`A.js 1`] = ` +exports[`A.js-flow 1`] = ` "/** * @flow */ @@ -31,7 +31,7 @@ module.exports = { " `; -exports[`bad_shadowing.js 1`] = ` +exports[`bad_shadowing.js-flow 1`] = ` "/** * @flow */ @@ -72,7 +72,7 @@ var duck: string = \\"quack\\"; " `; -exports[`good_shadowing.js 1`] = ` +exports[`good_shadowing.js-flow 1`] = ` "/** * @flow */ @@ -117,7 +117,7 @@ var b: Foo = new A.Foo(); " `; -exports[`import_type.js 1`] = ` +exports[`import_type.js-flow 1`] = ` "/** * @flow */ @@ -156,7 +156,7 @@ var a: Foo = new actualA.Foo(); " `; -exports[`type_alias.js 1`] = ` +exports[`type_alias.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/type_param_defaults/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_param_defaults/__snapshots__/jsfmt.spec.js.snap index 8819ac4e9..80c2e3332 100644 --- a/tests/flow/type_param_defaults/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_param_defaults/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`classes.js 1`] = ` +exports[`classes.js-flow 1`] = ` "/* @flow */ class A { diff --git a/tests/flow/type_param_scope/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_param_scope/__snapshots__/jsfmt.spec.js.snap index 8353f4618..0c3b87b55 100644 --- a/tests/flow/type_param_scope/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_param_scope/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class.js 1`] = ` +exports[`class.js-flow 1`] = ` "class C { a(x:T, a:A) { this.b(x); // ok @@ -21,7 +21,7 @@ class C { " `; -exports[`default_params.js 1`] = ` +exports[`default_params.js-flow 1`] = ` "function f(a:T) { function g(b:U, c:T = a) { function h(d:U = b) {} @@ -50,7 +50,7 @@ f(0); // ok " `; -exports[`method_shadow.js 1`] = ` +exports[`method_shadow.js-flow 1`] = ` "// Ensure method type params properly shadow outer type params. Subclass ensures // the generated insttype has the correct tvars. Should behave the same for // classes, interfaces, and declared classes. diff --git a/tests/flow/type_param_variance/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_param_variance/__snapshots__/jsfmt.spec.js.snap index a42199cd4..ac4811969 100644 --- a/tests/flow/type_param_variance/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_param_variance/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`promise.js 1`] = ` +exports[`promise.js-flow 1`] = ` "/** * At the moment, all type params are invariant with * the exception of the single param to the Promise class, diff --git a/tests/flow/type_param_variance2/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_param_variance2/__snapshots__/jsfmt.spec.js.snap index e4179252d..78e431c3f 100644 --- a/tests/flow/type_param_variance2/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_param_variance2/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`promise.js 1`] = ` +exports[`promise.js-flow 1`] = ` "/** * Here the definition of Promise is routed to the class Promise * in the user-specified library libs/Promise.js diff --git a/tests/flow/type_param_variance2/libs/__snapshots__/jsfmt.spec.js.snap b/tests/flow/type_param_variance2/libs/__snapshots__/jsfmt.spec.js.snap index 680f303fb..ed856f464 100644 --- a/tests/flow/type_param_variance2/libs/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/type_param_variance2/libs/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Promise.js 1`] = ` +exports[`Promise.js-flow 1`] = ` "// Copyright 2004-present Facebook. All Rights Reserved. // These annotations are copy/pasted from the built-in Flow definitions for diff --git a/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap b/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap index 8ed5aa972..9db7d6d88 100644 --- a/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/typeapp_perf/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test1.js 1`] = ` +exports[`test1.js-flow 1`] = ` "/* This test ensures that the code below does not take a long time to check. If * this test is taking a very long time to complete, there is a bug. */ @@ -45,7 +45,7 @@ declare var b: B; " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "/* This test ensures that the code below does not take a long time to check. If * this test is taking a very long time to complete, there is a bug. */ diff --git a/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap b/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap index 8b0911505..6cb4a57c7 100644 --- a/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/typecast/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`typecast.js 1`] = ` +exports[`typecast.js-flow 1`] = ` "/** * Copyright 2004-present Facebook. All Rights Reserved. */ diff --git a/tests/flow/typeof/__snapshots__/jsfmt.spec.js.snap b/tests/flow/typeof/__snapshots__/jsfmt.spec.js.snap index d32615f67..d38b76819 100644 --- a/tests/flow/typeof/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/typeof/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`typeof.js 1`] = ` +exports[`typeof.js-flow 1`] = ` "/** * @flow */ diff --git a/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap b/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap index e45116194..4026cec65 100644 --- a/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/unary/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`unary.js 1`] = ` +exports[`unary.js-flow 1`] = ` "/* @flow */ function x0(y: string): number { @@ -43,7 +43,7 @@ function x4(y: string): boolean { " `; -exports[`update.js 1`] = ` +exports[`update.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/unchecked_haste_module_vs_lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/unchecked_haste_module_vs_lib/__snapshots__/jsfmt.spec.js.snap index 4e080e5c9..648cf9d26 100644 --- a/tests/flow/unchecked_haste_module_vs_lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/unchecked_haste_module_vs_lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`buffer.js 1`] = ` +exports[`buffer.js-flow 1`] = ` "/** * @providesModule buffer * @@ -29,7 +29,7 @@ export var INSPECT_MAX_BYTES = 0; " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * Copyright 2004-present Facebook. All Rights Reserved. * @flow diff --git a/tests/flow/unchecked_node_module_vs_lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/unchecked_node_module_vs_lib/__snapshots__/jsfmt.spec.js.snap index b14bdf32e..b65c22f3a 100644 --- a/tests/flow/unchecked_node_module_vs_lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/unchecked_node_module_vs_lib/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "/** * Test resolution precedence in node: * checked module > lib def > unchecked module diff --git a/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap b/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap index 0a01d5739..cd8be8ed6 100644 --- a/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/undefined/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`issue-518.js 1`] = ` +exports[`issue-518.js-flow 1`] = ` "function doSomethingAsync(): Promise { return new Promise((resolve, reject) => { resolve(); // OK to leave out arg, same as resolve(undefined) @@ -29,7 +29,7 @@ foo(); " `; -exports[`undefined.js 1`] = ` +exports[`undefined.js-flow 1`] = ` "function foo() { var x; x.foo(); @@ -56,7 +56,7 @@ function qux(x?: number, y: string = \\"\\", z) {} " `; -exports[`undefined2.js 1`] = ` +exports[`undefined2.js-flow 1`] = ` "// @flow let tests = [ diff --git a/tests/flow/unicode/__snapshots__/jsfmt.spec.js.snap b/tests/flow/unicode/__snapshots__/jsfmt.spec.js.snap index c1f814f2b..55bac34a7 100644 --- a/tests/flow/unicode/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/unicode/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`UnicodeUtils.js 1`] = ` +exports[`UnicodeUtils.js-flow 1`] = ` "/** * @flow */ @@ -72,7 +72,7 @@ function utf16Length(str, pos) { " `; -exports[`keys.js 1`] = ` +exports[`keys.js-flow 1`] = ` "({'この事はつもり素晴らしいことさ': '35jL9V'}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ({ \\"この事はつもり素晴らしいことさ\\": \\"35jL9V\\" }); diff --git a/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap index e7fbe2880..6cdfd35c4 100644 --- a/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union-intersection/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`gen_big_disjoint_union.js 1`] = ` +exports[`gen_big_disjoint_union.js-flow 1`] = ` "// perf test for big disjoint union with 1000 cases type TAction = { @@ -8013,7 +8013,7 @@ function foo(x: TAction): TAction { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type A = {a: number}; type B = {b: number}; type C = {c: number}; diff --git a/tests/flow/union/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union/__snapshots__/jsfmt.spec.js.snap index a3621719a..91f5bb17c 100644 --- a/tests/flow/union/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`fields.js 1`] = ` +exports[`fields.js-flow 1`] = ` "class C { x: ?number|string; constructor() { @@ -17,7 +17,7 @@ class C { " `; -exports[`fields2.js 1`] = ` +exports[`fields2.js-flow 1`] = ` "class C { } class D { @@ -40,7 +40,7 @@ class D { " `; -exports[`issue-17.js 1`] = ` +exports[`issue-17.js-flow 1`] = ` "/* @flow */ type T = @@ -75,7 +75,7 @@ var l: Array = [ " `; -exports[`issue-198.js 1`] = ` +exports[`issue-198.js-flow 1`] = ` "var p = new Promise(function(resolve, reject) { resolve(5); }) @@ -100,7 +100,7 @@ var p = new Promise(function(resolve, reject) { " `; -exports[`issue-256.js 1`] = ` +exports[`issue-256.js-flow 1`] = ` "declare class Myclass { myfun(myarray: Array): any; } @@ -119,7 +119,7 @@ myclass.myfun([\\"1\\", \\"2\\", \\"3\\", \\"4\\", \\"5\\", \\"6\\", \\"7\\", fu " `; -exports[`issue-323.js 1`] = ` +exports[`issue-323.js-flow 1`] = ` "var Foo = require(\\"./issue-323-lib\\"); var foo = new Foo(); var foostr: Foo | string = foo; @@ -130,7 +130,7 @@ var foostr: Foo | string = foo; " `; -exports[`issue-323-lib.js 1`] = ` +exports[`issue-323-lib.js-flow 1`] = ` "/* @flow */ class Foo {} module.exports = Foo; @@ -141,7 +141,7 @@ module.exports = Foo; " `; -exports[`issue-324.js 1`] = ` +exports[`issue-324.js-flow 1`] = ` "/* @flow */ class Foo{}; class Bar{}; @@ -162,7 +162,7 @@ foostr = barstr; " `; -exports[`issue-325.js 1`] = ` +exports[`issue-325.js-flow 1`] = ` "class Tag { constructor() { var a1: Array = []; @@ -195,7 +195,7 @@ class Tag_ { " `; -exports[`issue-326.js 1`] = ` +exports[`issue-326.js-flow 1`] = ` "var numberAndStringArr:Array = [1,2]; var stringArr:Array = ['a','b']; @@ -208,7 +208,7 @@ var result = numberAndStringArr.concat(stringArr); // no error " `; -exports[`issue-582.js 1`] = ` +exports[`issue-582.js-flow 1`] = ` "/*** * nested unions * @flow @@ -241,7 +241,7 @@ var nested2: FooBarBaz = \\"baz\\"; " `; -exports[`issue-963.js 1`] = ` +exports[`issue-963.js-flow 1`] = ` "/*** * unions with embedded intersections * @flow @@ -314,7 +314,7 @@ const u3: union2 = { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "var C = require('test-lib'); // TODO: spurious error! (replacing C with number makes the error go away) @@ -357,7 +357,7 @@ bar(f); " `; -exports[`test-lib.js 1`] = ` +exports[`test-lib.js-flow 1`] = ` "/* @providesModule test-lib */ class C { } @@ -370,7 +370,7 @@ module.exports = C; " `; -exports[`type-app.js 1`] = ` +exports[`type-app.js-flow 1`] = ` "/** * @flow */ @@ -403,7 +403,7 @@ var b: Iterator | number = 123; " `; -exports[`union.js 1`] = ` +exports[`union.js-flow 1`] = ` "function bar(x: Document | string): void { } bar(0); @@ -450,7 +450,7 @@ function corge(b) { " `; -exports[`yuge.js 1`] = ` +exports[`yuge.js-flow 1`] = ` "/** * great big union used as type annotation will be flowed into itself. * List.mem check avoids pathology, as long as singletons aren't converted. diff --git a/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap index 00de0123a..66694aa28 100644 --- a/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union_new/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`issue-815.js 1`] = ` +exports[`issue-815.js-flow 1`] = ` "/* @flow */ type T = A|B; class U {}; @@ -45,7 +45,7 @@ class VirtualNode { " `; -exports[`issue-824.js 1`] = ` +exports[`issue-824.js-flow 1`] = ` "import { B, C } from \\"./issue-824-helper\\"; type K = B | C; @@ -82,7 +82,7 @@ export default class A { " `; -exports[`issue-824-helper.js 1`] = ` +exports[`issue-824-helper.js-flow 1`] = ` "import A from \\"./issue-824\\"; export class B extends A { @@ -111,7 +111,7 @@ export class C extends A { " `; -exports[`issue-1349.js 1`] = ` +exports[`issue-1349.js-flow 1`] = ` "/* @flow */ var bar: Array<{b: ?boolean, c: number} | {b: boolean}> = [ @@ -128,7 +128,7 @@ var bar: Array<{ b: ?boolean, c: number } | { b: boolean }> = [ " `; -exports[`issue-1371.js 1`] = ` +exports[`issue-1371.js-flow 1`] = ` "function create(a: any): { type: 'B', data: number } | { type: 'A', data: string } { return { @@ -148,7 +148,7 @@ function create( " `; -exports[`issue-1455.js 1`] = ` +exports[`issue-1455.js-flow 1`] = ` "/* @flow */ import type {Foobar} from \\"./issue-1455-helper\\" @@ -170,7 +170,7 @@ function node(content: ?Foobar | String | Array) { " `; -exports[`issue-1455-helper.js 1`] = ` +exports[`issue-1455-helper.js-flow 1`] = ` "/* @flow */ export class Foobar { } @@ -181,7 +181,7 @@ export class Foobar {} " `; -exports[`issue-1462-i.js 1`] = ` +exports[`issue-1462-i.js-flow 1`] = ` "type Common = { }; @@ -229,7 +229,7 @@ function printAll(val: MyType) { " `; -exports[`issue-1462-ii.js 1`] = ` +exports[`issue-1462-ii.js-flow 1`] = ` "type Common = { }; @@ -290,7 +290,7 @@ function printAll(val: MyType) { " `; -exports[`issue-1664.js 1`] = ` +exports[`issue-1664.js-flow 1`] = ` "/* @flow */ type DataBase = { @@ -347,7 +347,7 @@ if (data.kind === \\"system\\") { " `; -exports[`issue-1759.js 1`] = ` +exports[`issue-1759.js-flow 1`] = ` "// @flow type X = ({a:true} & {b:string}) | ({a:false} & {c:string}); @@ -369,7 +369,7 @@ function hello(x: X): string { " `; -exports[`issue-2232.js 1`] = ` +exports[`issue-2232.js-flow 1`] = ` "/* @flow */ declare type Entity = { @@ -421,7 +421,7 @@ function test(f: Foo | EmptyFoo) { " `; -exports[`test1.js 1`] = ` +exports[`test1.js-flow 1`] = ` "// @noflow /** @@ -546,7 +546,7 @@ type A6 = B6[]; " `; -exports[`test2.js 1`] = ` +exports[`test2.js-flow 1`] = ` "// @noflow /** @@ -705,7 +705,7 @@ type B6 = string; " `; -exports[`test3.js 1`] = ` +exports[`test3.js-flow 1`] = ` "// @noflow /** @@ -768,7 +768,7 @@ type B2 = string; " `; -exports[`test4.js 1`] = ` +exports[`test4.js-flow 1`] = ` "// @noflow /** @@ -851,7 +851,7 @@ type B2 = string; " `; -exports[`test5.js 1`] = ` +exports[`test5.js-flow 1`] = ` "// @noflow /** @@ -916,7 +916,7 @@ function arr_set(x: string, i: number) { " `; -exports[`test6.js 1`] = ` +exports[`test6.js-flow 1`] = ` "// @noflow /** @@ -973,7 +973,7 @@ class C {} " `; -exports[`test7.js 1`] = ` +exports[`test7.js-flow 1`] = ` "// @noflow /** @@ -1036,7 +1036,7 @@ type PG = { x: X, y?: PG }; " `; -exports[`test8.js 1`] = ` +exports[`test8.js-flow 1`] = ` "// @noflow /** @@ -1087,7 +1087,7 @@ type H2_ = number; " `; -exports[`test9.js 1`] = ` +exports[`test9.js-flow 1`] = ` "// @noflow /** @@ -1124,7 +1124,7 @@ foo((x): number => square(x)); " `; -exports[`test10.js 1`] = ` +exports[`test10.js-flow 1`] = ` "// @noflow function id(x: X): X { return x; } @@ -1275,7 +1275,7 @@ check_poly_inst(new P()); " `; -exports[`test11.js 1`] = ` +exports[`test11.js-flow 1`] = ` "// @noflow // disjoint unions @@ -1315,7 +1315,7 @@ type Cons = { kind: \\"cons\\", next: List }; " `; -exports[`test12.js 1`] = ` +exports[`test12.js-flow 1`] = ` "// @noflow // polymorphic recursive types @@ -1340,7 +1340,7 @@ function rec(x: F): G | H { " `; -exports[`test13.js 1`] = ` +exports[`test13.js-flow 1`] = ` "// @noflow /* ensure there are no unintended side effects when trying branches */ @@ -1369,7 +1369,7 @@ exports[`test13.js 1`] = ` " `; -exports[`test14.js 1`] = ` +exports[`test14.js-flow 1`] = ` "// @noflow // annotations @@ -1400,7 +1400,7 @@ function foo(c: C) { " `; -exports[`test15.js 1`] = ` +exports[`test15.js-flow 1`] = ` "// @noflow // functions as objects @@ -1453,7 +1453,7 @@ bar(() => {}); " `; -exports[`test16.js 1`] = ` +exports[`test16.js-flow 1`] = ` "// @noflow // annotations @@ -1496,7 +1496,7 @@ x = \\"\\"; " `; -exports[`test17.js 1`] = ` +exports[`test17.js-flow 1`] = ` "// @noflow // Array#concat @@ -1515,7 +1515,7 @@ exports[`test17.js 1`] = ` " `; -exports[`test18.js 1`] = ` +exports[`test18.js-flow 1`] = ` "// @noflow // method overloads @@ -1546,7 +1546,7 @@ new C().m(f()); " `; -exports[`test19.js 1`] = ` +exports[`test19.js-flow 1`] = ` "// @noflow // constructor overloads @@ -1575,7 +1575,7 @@ declare class D { " `; -exports[`test20.js 1`] = ` +exports[`test20.js-flow 1`] = ` "// @noflow // Array#reduce @@ -1605,7 +1605,7 @@ exports[`test20.js 1`] = ` " `; -exports[`test21.js 1`] = ` +exports[`test21.js-flow 1`] = ` "// @noflow // annotations for disjoint unions @@ -1650,7 +1650,7 @@ function str() { " `; -exports[`test22.js 1`] = ` +exports[`test22.js-flow 1`] = ` "// @noflow // refinement of disjoint unions @@ -1699,7 +1699,7 @@ function foo(x: T) { " `; -exports[`test23.js 1`] = ` +exports[`test23.js-flow 1`] = ` "// @noflow // nested intersections (see also lib/test23_lib.js) @@ -1728,7 +1728,7 @@ function foo(obj: Obj) { " `; -exports[`test24.js 1`] = ` +exports[`test24.js-flow 1`] = ` "// @noflow // scaling test for full type resolution @@ -1798,7 +1798,7 @@ declare class D extends C { " `; -exports[`test25.js 1`] = ` +exports[`test25.js-flow 1`] = ` "// @noflow // termination test (see also lib/test25_lib.js) @@ -1826,7 +1826,7 @@ function foo(rows: Rows, set: Set) { " `; -exports[`test26.js 1`] = ` +exports[`test26.js-flow 1`] = ` "// @noflow declare function foo(x: number): number; @@ -1871,7 +1871,7 @@ new Record().set(\\"foo\\", \\"42\\"); " `; -exports[`test27.js 1`] = ` +exports[`test27.js-flow 1`] = ` "// @noflow type X = ({a:true} & {b:string}) | ({a:false} & {c:string}); @@ -1926,7 +1926,7 @@ function hello4(x: X): string { " `; -exports[`test29.js 1`] = ` +exports[`test29.js-flow 1`] = ` "// @noflow // Make sure caching doesn't cause a spurious successful match (e.g., when a @@ -1987,7 +1987,7 @@ class C { " `; -exports[`test30.js 1`] = ` +exports[`test30.js-flow 1`] = ` "// @noflow const Constants = require('./test30-helper'); @@ -2008,7 +2008,7 @@ type ActionType = { type: \\"foo\\", x: number } | { type: \\"bar\\", x: number " `; -exports[`test30-helper.js 1`] = ` +exports[`test30-helper.js-flow 1`] = ` "// @noflow module.exports = { @@ -2025,7 +2025,7 @@ module.exports = { " `; -exports[`test31.js 1`] = ` +exports[`test31.js-flow 1`] = ` "// @noflow // make sure tuples are type arguments (as used e.g. when viewing maps as @@ -2080,7 +2080,7 @@ function foo(): ImmutableMap { " `; -exports[`test32.js 1`] = ` +exports[`test32.js-flow 1`] = ` "// @flow // make sure that full resolution jobs don't cache improperly to signal success diff --git a/tests/flow/union_new/lib/__snapshots__/jsfmt.spec.js.snap b/tests/flow/union_new/lib/__snapshots__/jsfmt.spec.js.snap index 678c14443..8abd23b14 100644 --- a/tests/flow/union_new/lib/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/union_new/lib/__snapshots__/jsfmt.spec.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test23_lib.js 1`] = ` +exports[`test23_lib.js-flow 1`] = ` "declare class SomeLibClass { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ declare class SomeLibClass {} " `; -exports[`test25_lib.js 1`] = ` +exports[`test25_lib.js-flow 1`] = ` "declare class Set { add(): Set; } @@ -54,7 +54,7 @@ declare class Rows { " `; -exports[`test32_lib.js 1`] = ` +exports[`test32_lib.js-flow 1`] = ` "type Indirect = Array; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ type Indirect = Array; diff --git a/tests/flow/unreachable/__snapshots__/jsfmt.spec.js.snap b/tests/flow/unreachable/__snapshots__/jsfmt.spec.js.snap index 58cac920d..28924839e 100644 --- a/tests/flow/unreachable/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/unreachable/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`typecheck.js 1`] = ` +exports[`typecheck.js-flow 1`] = ` "/* @flow */ function test1(): string { @@ -51,7 +51,7 @@ function test2() { " `; -exports[`unreachable.js 1`] = ` +exports[`unreachable.js-flow 1`] = ` "/* @flow */ function foo(x, y) { diff --git a/tests/flow/value/__snapshots__/jsfmt.spec.js.snap b/tests/flow/value/__snapshots__/jsfmt.spec.js.snap index da9c2fb8a..a8c7b8144 100644 --- a/tests/flow/value/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/value/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`value.js 1`] = ` +exports[`value.js-flow 1`] = ` "var o = {}; o[\\"x\\"] = 4; var y:string = o[\\"x\\"]; diff --git a/tests/flow/vim_emacs_errors/__snapshots__/jsfmt.spec.js.snap b/tests/flow/vim_emacs_errors/__snapshots__/jsfmt.spec.js.snap index bb5e476dc..dcfd9207d 100644 --- a/tests/flow/vim_emacs_errors/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/vim_emacs_errors/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "// @flow (123: string); diff --git a/tests/flow/weakmode/__snapshots__/jsfmt.spec.js.snap b/tests/flow/weakmode/__snapshots__/jsfmt.spec.js.snap index 3558c5a73..92d6de4fe 100644 --- a/tests/flow/weakmode/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/weakmode/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`should_fail_without_weak.js 1`] = ` +exports[`should_fail_without_weak.js-flow 1`] = ` "/* @flow */ // This should fail without weak mode, because of the glaring type error. @@ -25,7 +25,7 @@ function expects_an_int() { " `; -exports[`should_pass_with_weak.js 1`] = ` +exports[`should_pass_with_weak.js-flow 1`] = ` "/* @flow weak */ // This should fail without weak mode, because of the glaring type error. diff --git a/tests/flow/while/__snapshots__/jsfmt.spec.js.snap b/tests/flow/while/__snapshots__/jsfmt.spec.js.snap index 0ccb2cd51..fb06b6c58 100644 --- a/tests/flow/while/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/while/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`abnormal.js 1`] = ` +exports[`abnormal.js-flow 1`] = ` "/* @flow */ function foo(x: boolean) { @@ -45,7 +45,7 @@ function bar(x: boolean) { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "class C { m() { return new C; } } diff --git a/tests/flow/window/__snapshots__/jsfmt.spec.js.snap b/tests/flow/window/__snapshots__/jsfmt.spec.js.snap index 50de50c1a..54c0aaa89 100644 --- a/tests/flow/window/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/window/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`window1.js 1`] = ` +exports[`window1.js-flow 1`] = ` "/* @providesModule Window1 */ @@ -13,7 +13,7 @@ module.exports = window.history; " `; -exports[`window2.js 1`] = ` +exports[`window2.js-flow 1`] = ` "/* @providesModule Window2 */ module.exports = window.parent; diff --git a/tests/flow/x/__snapshots__/jsfmt.spec.js.snap b/tests/flow/x/__snapshots__/jsfmt.spec.js.snap index 0ed8994a3..f01259376 100644 --- a/tests/flow/x/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow/x/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`XControllerURIBuilder.js 1`] = ` +exports[`XControllerURIBuilder.js-flow 1`] = ` "/** * @generated SignedSource<<13ca42bbc7fe91f15057861e18a77d88>> * diff --git a/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap b/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap index b4225c2bb..06a4c9bb6 100644 --- a/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_comments/__snapshots__/jsfmt.spec.js.snap @@ -1,21 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`arrow.js 1`] = ` -"// Error -const beep = (data/*: Object*/) => {} - -// OK -const beep = (data/*: Object*/, secondData/*: Object*/) => {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Error -const beep = (data: Object) => {}; - -// OK -const beep = (data: Object, secondData: Object) => {}; -" -`; - -exports[`arrow.js 2`] = ` +exports[`arrow.js-babylon 1`] = ` "// Error const beep = (data/*: Object*/) => {} @@ -29,3 +14,18 @@ const beep = (data /*: Object*/) => {}; const beep = (data /*: Object*/, secondData /*: Object*/) => {}; " `; + +exports[`arrow.js-flow 1`] = ` +"// Error +const beep = (data/*: Object*/) => {} + +// OK +const beep = (data/*: Object*/, secondData/*: Object*/) => {} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Error +const beep = (data: Object) => {}; + +// OK +const beep = (data: Object, secondData: Object) => {}; +" +`; diff --git a/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap b/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap index 65d1bee9e..4c87e092f 100644 --- a/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_generic/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`break.js 1`] = ` +exports[`break.js-flow 1`] = ` "var X = { perform: function< A, B, C, D, E, F, G, diff --git a/tests/flow_method/__snapshots__/jsfmt.spec.js.snap b/tests/flow_method/__snapshots__/jsfmt.spec.js.snap index 56a65ecc8..355a072b6 100644 --- a/tests/flow_method/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_method/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comment.js 1`] = ` +exports[`comment.js-flow 1`] = ` "type Foo = { method( arg: number, // I belong with baz @@ -17,7 +17,7 @@ type Foo = { " `; -exports[`method.js 1`] = ` +exports[`method.js-flow 1`] = ` "type T = { method: () => void }; type T = { method(): void }; declare class X { method(): void } diff --git a/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap b/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap index 1314cca0a..873f44bda 100644 --- a/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/flow_object_comment/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`flow_object_comment.js 1`] = ` +exports[`flow_object_comment.js-flow 1`] = ` "export default ( { foo, diff --git a/tests/for/__snapshots__/jsfmt.spec.js.snap b/tests/for/__snapshots__/jsfmt.spec.js.snap index d9a722cae..13e299b41 100644 --- a/tests/for/__snapshots__/jsfmt.spec.js.snap +++ b/tests/for/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comment.js 1`] = ` +exports[`comment.js-flow 1`] = ` "for (x /*a*/ in //b @@ -67,7 +67,7 @@ for (x of y); " `; -exports[`comment.js 2`] = ` +exports[`comment.js-typescript 1`] = ` "for (x /*a*/ in //b @@ -134,7 +134,7 @@ for (x of y); " `; -exports[`for.js 1`] = ` +exports[`for.js-flow 1`] = ` "for (;;) {} for (var i = 0; i < 10; ++i) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -145,7 +145,7 @@ for (var i = 0; i < 10; ++i) { " `; -exports[`for.js 2`] = ` +exports[`for.js-typescript 1`] = ` "for (;;) {} for (var i = 0; i < 10; ++i) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -156,7 +156,7 @@ for (var i = 0; i < 10; ++i) { " `; -exports[`in.js 1`] = ` +exports[`in.js-flow 1`] = ` "for ((x in a);;) {} for (a=(a in b);;) {} for (let a = (b in c); ; ); @@ -185,7 +185,7 @@ async function f() { " `; -exports[`in.js 2`] = ` +exports[`in.js-typescript 1`] = ` "for ((x in a);;) {} for (a=(a in b);;) {} for (let a = (b in c); ; ); @@ -214,7 +214,7 @@ async function f() { " `; -exports[`var.js 1`] = ` +exports[`var.js-flow 1`] = ` "for (a in b) var c = {}; []; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (a in b) @@ -223,7 +223,7 @@ for (a in b) " `; -exports[`var.js 2`] = ` +exports[`var.js-typescript 1`] = ` "for (a in b) var c = {}; []; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ for (a in b) diff --git a/tests/function/__snapshots__/jsfmt.spec.js.snap b/tests/function/__snapshots__/jsfmt.spec.js.snap index e5d39150b..7a9386802 100644 --- a/tests/function/__snapshots__/jsfmt.spec.js.snap +++ b/tests/function/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`function_expression.js 1`] = ` +exports[`function_expression.js-flow 1`] = ` "(function() {}).length typeof (function() {}); export default (function() {})(); @@ -27,7 +27,7 @@ new function() {}(); " `; -exports[`function_expression.js 2`] = ` +exports[`function_expression.js-typescript 1`] = ` "(function() {}).length typeof (function() {}); export default (function() {})(); diff --git a/tests/if/__snapshots__/jsfmt.spec.js.snap b/tests/if/__snapshots__/jsfmt.spec.js.snap index a961d8bfc..4c5cb73aa 100644 --- a/tests/if/__snapshots__/jsfmt.spec.js.snap +++ b/tests/if/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`else.js 1`] = ` +exports[`else.js-flow 1`] = ` "// Both functions below should be formatted exactly the same function f() { @@ -42,7 +42,7 @@ function f() { " `; -exports[`else.js 2`] = ` +exports[`else.js-typescript 1`] = ` "// Both functions below should be formatted exactly the same function f() { @@ -84,7 +84,7 @@ function f() { " `; -exports[`if_comments.js 1`] = ` +exports[`if_comments.js-flow 1`] = ` "async function f() { if (untrackedChoice === 0) /* Cancel */ { return null; @@ -158,7 +158,7 @@ async function f() { " `; -exports[`if_comments.js 2`] = ` +exports[`if_comments.js-typescript 1`] = ` "async function f() { if (untrackedChoice === 0) /* Cancel */ { return null; diff --git a/tests/ignore/__snapshots__/jsfmt.spec.js.snap b/tests/ignore/__snapshots__/jsfmt.spec.js.snap index 8c530fdae..2a4d737b1 100644 --- a/tests/ignore/__snapshots__/jsfmt.spec.js.snap +++ b/tests/ignore/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ignore.js 1`] = ` +exports[`ignore.js-flow 1`] = ` "function a() { // prettier-ignore var fnString = diff --git a/tests/import/__snapshots__/jsfmt.spec.js.snap b/tests/import/__snapshots__/jsfmt.spec.js.snap index d35e1dc29..4c24cd3f1 100644 --- a/tests/import/__snapshots__/jsfmt.spec.js.snap +++ b/tests/import/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`brackets.js 1`] = ` +exports[`brackets.js-flow 1`] = ` "import { runTaskForChanged, description, @@ -27,7 +27,7 @@ import { fitsIn, oneLine } from \\".\\"; " `; -exports[`brackets.js 2`] = ` +exports[`brackets.js-flow 2`] = ` "import { runTaskForChanged, description, @@ -54,7 +54,7 @@ import {fitsIn, oneLine} from \\".\\"; " `; -exports[`brackets.js 3`] = ` +exports[`brackets.js-typescript 1`] = ` "import { runTaskForChanged, description, @@ -81,7 +81,7 @@ import { fitsIn, oneLine } from \\".\\"; " `; -exports[`brackets.js 4`] = ` +exports[`brackets.js-typescript 2`] = ` "import { runTaskForChanged, description, @@ -108,7 +108,7 @@ import {fitsIn, oneLine} from \\".\\"; " `; -exports[`comments.js 1`] = ` +exports[`comments.js-flow 1`] = ` "import { a //comment1 //comment2 //comment3 @@ -179,7 +179,7 @@ import { " `; -exports[`comments.js 2`] = ` +exports[`comments.js-flow 2`] = ` "import { a //comment1 //comment2 //comment3 @@ -250,7 +250,7 @@ import { " `; -exports[`comments.js 3`] = ` +exports[`comments.js-typescript 1`] = ` "import { a //comment1 //comment2 //comment3 @@ -321,7 +321,7 @@ import { " `; -exports[`comments.js 4`] = ` +exports[`comments.js-typescript 2`] = ` "import { a //comment1 //comment2 //comment3 @@ -392,7 +392,7 @@ import { " `; -exports[`long-line.js 1`] = ` +exports[`long-line.js-flow 1`] = ` "import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import someCoolUtilWithARatherLongName @@ -400,7 +400,7 @@ import someCoolUtilWithARatherLongName " `; -exports[`long-line.js 2`] = ` +exports[`long-line.js-flow 2`] = ` "import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import someCoolUtilWithARatherLongName @@ -408,7 +408,7 @@ import someCoolUtilWithARatherLongName " `; -exports[`long-line.js 3`] = ` +exports[`long-line.js-typescript 1`] = ` "import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import someCoolUtilWithARatherLongName @@ -416,7 +416,7 @@ import someCoolUtilWithARatherLongName " `; -exports[`long-line.js 4`] = ` +exports[`long-line.js-typescript 2`] = ` "import someCoolUtilWithARatherLongName from '../../../../utils/someCoolUtilWithARatherLongName'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import someCoolUtilWithARatherLongName @@ -424,28 +424,28 @@ import someCoolUtilWithARatherLongName " `; -exports[`multiple_standalones.js 1`] = ` +exports[`multiple_standalones.js-flow 1`] = ` "import a, * as b from 'a'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import a, * as b from \\"a\\"; " `; -exports[`multiple_standalones.js 2`] = ` +exports[`multiple_standalones.js-flow 2`] = ` "import a, * as b from 'a'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import a, * as b from \\"a\\"; " `; -exports[`multiple_standalones.js 3`] = ` +exports[`multiple_standalones.js-typescript 1`] = ` "import a, * as b from 'a'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import a, * as b from \\"a\\"; " `; -exports[`multiple_standalones.js 4`] = ` +exports[`multiple_standalones.js-typescript 2`] = ` "import a, * as b from 'a'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import a, * as b from \\"a\\"; diff --git a/tests/interface/__snapshots__/jsfmt.spec.js.snap b/tests/interface/__snapshots__/jsfmt.spec.js.snap index bcdda38e9..ab707bf9a 100644 --- a/tests/interface/__snapshots__/jsfmt.spec.js.snap +++ b/tests/interface/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`module.js 1`] = ` +exports[`module.js-flow 1`] = ` "declare module X { declare interface Y { x: number; } } diff --git a/tests/jsx-multiline-assign/__snapshots__/jsfmt.spec.js.snap b/tests/jsx-multiline-assign/__snapshots__/jsfmt.spec.js.snap index f3c81c431..996fdda66 100644 --- a/tests/jsx-multiline-assign/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx-multiline-assign/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "const comp1 = (
Keep the wrapping parens. @@ -53,7 +53,7 @@ const comp5 =
Keep it on one line.
; " `; -exports[`test.js 2`] = ` +exports[`test.js-typescript 1`] = ` "const comp1 = (
Keep the wrapping parens. diff --git a/tests/jsx-newlines/__snapshots__/jsfmt.spec.js.snap b/tests/jsx-newlines/__snapshots__/jsfmt.spec.js.snap index 74e727aa2..70b72d245 100644 --- a/tests/jsx-newlines/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx-newlines/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "keep =

Welcome to the Universal React Starter-kyt. This starter kyt should serve as the base for an advanced, @@ -188,7 +188,7 @@ regression_extra_newline_2 = ( " `; -exports[`test.js 2`] = ` +exports[`test.js-typescript 1`] = ` "keep =

Welcome to the Universal React Starter-kyt. This starter kyt should serve as the base for an advanced, diff --git a/tests/jsx-significant-space/__snapshots__/jsfmt.spec.js.snap b/tests/jsx-significant-space/__snapshots__/jsfmt.spec.js.snap index 301b52b6d..43d298642 100644 --- a/tests/jsx-significant-space/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx-significant-space/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "after = foo bar @@ -199,7 +199,7 @@ not_broken_begin = ( " `; -exports[`test.js 2`] = ` +exports[`test.js-typescript 1`] = ` "after = foo bar diff --git a/tests/jsx-split-attrs/__snapshots__/jsfmt.spec.js.snap b/tests/jsx-split-attrs/__snapshots__/jsfmt.spec.js.snap index 4b1f99702..b82e5baf9 100644 --- a/tests/jsx-split-attrs/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx-split-attrs/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "long_closed = @@ -213,7 +213,7 @@ long_obj = ( " `; -exports[`test.js 2`] = ` +exports[`test.js-typescript 1`] = ` "long_closed = diff --git a/tests/jsx-stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap b/tests/jsx-stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap index 953856572..36430f9b8 100644 --- a/tests/jsx-stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx-stateless-arrow-fn/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "const render1 = ({ styles }) => (

Keep the wrapping parens. Put each key on its own line. @@ -233,7 +233,7 @@ const renderTernary = props => ( " `; -exports[`test.js 2`] = ` +exports[`test.js-typescript 1`] = ` "const render1 = ({ styles }) => (
Keep the wrapping parens. Put each key on its own line. diff --git a/tests/jsx/__snapshots__/jsfmt.spec.js.snap b/tests/jsx/__snapshots__/jsfmt.spec.js.snap index a24d5d571..ef8c80580 100644 --- a/tests/jsx/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`expression.js 1`] = ` +exports[`expression.js-flow 1`] = ` " {__DEV__ ? this.renderDevApp() @@ -348,7 +348,7 @@ exports[`hug.js 1`] = ` " `; -exports[`hug.js 2`] = ` +exports[`hug.js-typescript 1`] = ` "
{__DEV__ ? this.renderDevApp() @@ -418,7 +418,7 @@ exports[`hug.js 2`] = ` " `; -exports[`object-property.js 1`] = ` +exports[`object-property.js-flow 1`] = ` "const tabs = [ { title: \\"General Info\\", @@ -449,7 +449,7 @@ const tabs = [ " `; -exports[`object-property.js 2`] = ` +exports[`object-property.js-typescript 1`] = ` "const tabs = [ { title: \\"General Info\\", @@ -480,7 +480,7 @@ const tabs = [ " `; -exports[`open-break.js 1`] = ` +exports[`open-break.js-flow 1`] = ` " { a @@ -510,7 +510,7 @@ onClick={() => { " `; -exports[`open-break.js 2`] = ` +exports[`open-break.js-typescript 1`] = ` " { a @@ -540,7 +540,7 @@ onClick={() => { " `; -exports[`parens.js 1`] = ` +exports[`parens.js-flow 1`] = ` "a = [ &quot;\\" />;
;
&quot;'} />; @@ -609,7 +609,7 @@ exports[`quotes.js 1`] = ` " `; -exports[`quotes.js 2`] = ` +exports[`quotes.js-typescript 1`] = ` "
&quot;\\" />;
;
&quot;'} />; diff --git a/tests/jsx_escape/__snapshots__/jsfmt.spec.js.snap b/tests/jsx_escape/__snapshots__/jsfmt.spec.js.snap index 2f56656cb..3f6056f99 100644 --- a/tests/jsx_escape/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx_escape/__snapshots__/jsfmt.spec.js.snap @@ -1,37 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`escape.js 1`] = ` +exports[`escape.js-babylon 1`] = ` "
<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<
; " `; -exports[`escape.js 2`] = ` +exports[`escape.js-flow 1`] = ` "
<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<
; " `; -exports[`nbsp.js 1`] = ` -"many_nbsp =
   
-single_nbsp =
 
-many_raw_nbsp =
   
- - -amp = foo & bar -raw_amp = foo & bar -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -many_nbsp =
   
; -single_nbsp =
 
; -many_raw_nbsp =
   
; -amp = foo & bar; -raw_amp = foo & bar; -" -`; - -exports[`nbsp.js 2`] = ` +exports[`nbsp.js-babylon 1`] = ` "many_nbsp =
   
single_nbsp =
 
many_raw_nbsp =
   
@@ -48,3 +31,20 @@ amp = foo & bar; raw_amp = foo & bar; " `; + +exports[`nbsp.js-flow 1`] = ` +"many_nbsp =
   
+single_nbsp =
 
+many_raw_nbsp =
   
+ + +amp = foo & bar +raw_amp = foo & bar +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +many_nbsp =
   
; +single_nbsp =
 
; +many_raw_nbsp =
   
; +amp = foo & bar; +raw_amp = foo & bar; +" +`; diff --git a/tests/jsx_last_line/__snapshots__/jsfmt.spec.js.snap b/tests/jsx_last_line/__snapshots__/jsfmt.spec.js.snap index d56dd3e59..120d3bbe6 100644 --- a/tests/jsx_last_line/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx_last_line/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`last_line.js 1`] = ` +exports[`last_line.js-flow 1`] = ` " action.payload.query) @@ -37,7 +37,7 @@ export default function searchUsers(action$) { " `; -exports[`break-parent.js 1`] = ` +exports[`break-parent.js-flow 1`] = ` "({ processors: [ require(\\"autoprefixer\\", { @@ -92,7 +92,7 @@ true " `; -exports[`jsx.js 1`] = ` +exports[`jsx.js-flow 1`] = ` "const els = items.map(item => (
{children} @@ -107,7 +107,7 @@ const els = items.map(item => ( " `; -exports[`object.js 1`] = ` +exports[`object.js-flow 1`] = ` "const formatData = pipe( zip, map(([ ref, data ]) => ({ @@ -150,7 +150,7 @@ export const log = y => { " `; -exports[`overflow.js 1`] = ` +exports[`overflow.js-flow 1`] = ` "SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((err, result) => { // comment }); diff --git a/tests/line/__snapshots__/jsfmt.spec.js.snap b/tests/line/__snapshots__/jsfmt.spec.js.snap index 6d76a8fbf..0d18cb358 100644 --- a/tests/line/__snapshots__/jsfmt.spec.js.snap +++ b/tests/line/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`windows.js 1`] = ` +exports[`windows.js-flow 1`] = ` "const vscode = require(\\"vscode\\"); const {getDir, getActiveFile, uint8arrayToString} = require(\\"./utils\\"); @@ -15,7 +15,7 @@ let _commands; " `; -exports[`windows.js 2`] = ` +exports[`windows.js-typescript 1`] = ` "const vscode = require(\\"vscode\\"); const {getDir, getActiveFile, uint8arrayToString} = require(\\"./utils\\"); diff --git a/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap b/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap index e4fc91e72..b8b00c559 100644 --- a/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`boundary.js 1`] = ` +exports[`boundary.js-babylon 1`] = ` "\`\${ a + // a a @@ -51,7 +51,7 @@ ExampleStory.getFragment(\\"story\\")} " `; -exports[`boundary.js 2`] = ` +exports[`boundary.js-flow 1`] = ` "\`\${ a + // a a diff --git a/tests/literal/__snapshots__/jsfmt.spec.js.snap b/tests/literal/__snapshots__/jsfmt.spec.js.snap index 19f45910d..e651ec414 100644 --- a/tests/literal/__snapshots__/jsfmt.spec.js.snap +++ b/tests/literal/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`number.js 1`] = ` +exports[`number.js-babylon 1`] = ` "// parentheses around numeric literal should be preserved function test5(): string { return (100).toString(); diff --git a/tests/member/__snapshots__/jsfmt.spec.js.snap b/tests/member/__snapshots__/jsfmt.spec.js.snap index 4263d57b0..2a4d5b9d6 100644 --- a/tests/member/__snapshots__/jsfmt.spec.js.snap +++ b/tests/member/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`expand.js 1`] = ` +exports[`expand.js-flow 1`] = ` "const veryVeryVeryVeryVeryVeryVeryLong = doc.expandedStates[doc.expandedStates.length - 1]; const small = doc.expandedStates[doc.expandedStates.length - 1];~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ const veryVeryVeryVeryVeryVeryVeryLong = doc.expandedStates[ @@ -10,7 +10,7 @@ const small = doc.expandedStates[doc.expandedStates.length - 1]; " `; -exports[`expand.js 2`] = ` +exports[`expand.js-typescript 1`] = ` "const veryVeryVeryVeryVeryVeryVeryLong = doc.expandedStates[doc.expandedStates.length - 1]; const small = doc.expandedStates[doc.expandedStates.length - 1];~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ const veryVeryVeryVeryVeryVeryVeryLong = doc.expandedStates[ diff --git a/tests/method-chain/__snapshots__/jsfmt.spec.js.snap b/tests/method-chain/__snapshots__/jsfmt.spec.js.snap index c781d2068..ac497142f 100644 --- a/tests/method-chain/__snapshots__/jsfmt.spec.js.snap +++ b/tests/method-chain/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`break-last-call.js 1`] = ` +exports[`break-last-call.js-flow 1`] = ` "export default store => { return callApi(endpoint, schema).then( response => next(actionWith({ @@ -119,7 +119,7 @@ it(\\"should group messages with same created time\\", () => { " `; -exports[`comment.js 1`] = ` +exports[`comment.js-flow 1`] = ` "function f() { return observableFromSubscribeFunction() // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is @@ -163,7 +163,7 @@ _.a( " `; -exports[`first_long.js 1`] = ` +exports[`first_long.js-flow 1`] = ` "export default function theFunction(action$, store) { return action$.ofType(THE_ACTION).switchMap(action => Observable .webSocket({ @@ -234,7 +234,7 @@ function f() { " `; -exports[`inline_merge.js 1`] = ` +exports[`inline_merge.js-flow 1`] = ` "Object.keys( availableLocales({ test: true @@ -254,7 +254,7 @@ Object.keys( " `; -exports[`logical.js 1`] = ` +exports[`logical.js-flow 1`] = ` "(veryLongVeryLongVeryLong || e).map(tickets => TicketRecord.createFromSomeLongString()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -263,7 +263,7 @@ exports[`logical.js 1`] = ` " `; -exports[`multiple-members.js 1`] = ` +exports[`multiple-members.js-flow 1`] = ` "if (testConfig.ENABLE_ONLINE_TESTS === \\"true\\") { describe(\\"POST /users/me/pet\\", function() { it(\\"saves pet\\", function() { @@ -300,7 +300,7 @@ if (testConfig.ENABLE_ONLINE_TESTS === \\"true\\") { " `; -exports[`square_0.js 1`] = ` +exports[`square_0.js-flow 1`] = ` "const version = someLongString .split('jest version =') .pop() @@ -315,7 +315,7 @@ const version = someLongString " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "method().then(x => x) [\\"abc\\"](x => x) [abc](x => x); @@ -330,7 +330,7 @@ method().then(x => x)[\\"abc\\"](x => x)[abc](x => x); " `; -exports[`this.js 1`] = ` +exports[`this.js-flow 1`] = ` "const sel = this.connections .concat(this.activities.concat(this.operators)) .filter(x => x.selected); diff --git a/tests/new_expression/__snapshots__/jsfmt.spec.js.snap b/tests/new_expression/__snapshots__/jsfmt.spec.js.snap index 1445f2e48..d1bb0cc4c 100644 --- a/tests/new_expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/new_expression/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`new_expression.js 1`] = ` +exports[`new_expression.js-flow 1`] = ` "new (memoize.Cache || MapCache) new (typeof this == \\"function\\" ? this : Dict()) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ new (typeof this == \\"function\\" ? this : Dict())(); " `; -exports[`new_expression.js 2`] = ` +exports[`new_expression.js-typescript 1`] = ` "new (memoize.Cache || MapCache) new (typeof this == \\"function\\" ? this : Dict()) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/object-prop-break-in/__snapshots__/jsfmt.spec.js.snap b/tests/object-prop-break-in/__snapshots__/jsfmt.spec.js.snap index 8227b17ad..4d1fd85e7 100644 --- a/tests/object-prop-break-in/__snapshots__/jsfmt.spec.js.snap +++ b/tests/object-prop-break-in/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comment.js 1`] = ` +exports[`comment.js-flow 1`] = ` "function foo() { return { // this comment causes the problem @@ -17,7 +17,7 @@ function foo() { " `; -exports[`comment.js 2`] = ` +exports[`comment.js-typescript 1`] = ` "function foo() { return { // this comment causes the problem @@ -34,7 +34,7 @@ function foo() { " `; -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "const a = classnames({ \\"some-prop\\": this.state.longLongLongLongLongLongLongLongLongTooLongProp }); @@ -95,7 +95,7 @@ const g = classnames({ " `; -exports[`test.js 2`] = ` +exports[`test.js-typescript 1`] = ` "const a = classnames({ \\"some-prop\\": this.state.longLongLongLongLongLongLongLongLongTooLongProp }); diff --git a/tests/object_colon_bug/__snapshots__/jsfmt.spec.js.snap b/tests/object_colon_bug/__snapshots__/jsfmt.spec.js.snap index 06ab37f72..4f491cd53 100644 --- a/tests/object_colon_bug/__snapshots__/jsfmt.spec.js.snap +++ b/tests/object_colon_bug/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`bug.js 1`] = ` +exports[`bug.js-flow 1`] = ` "const foo = { bar: props.bar ? props.bar : noop, baz: props.baz @@ -15,7 +15,7 @@ const foo = { " `; -exports[`bug.js 2`] = ` +exports[`bug.js-typescript 1`] = ` "const foo = { bar: props.bar ? props.bar : noop, baz: props.baz diff --git a/tests/object_property_comment/__snapshots__/jsfmt.spec.js.snap b/tests/object_property_comment/__snapshots__/jsfmt.spec.js.snap index 85e493ef5..c5cf2adc6 100644 --- a/tests/object_property_comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/object_property_comment/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comment.js 1`] = ` +exports[`comment.js-flow 1`] = ` "o = { name: // Comment A diff --git a/tests/objects/__snapshots__/jsfmt.spec.js.snap b/tests/objects/__snapshots__/jsfmt.spec.js.snap index e96e512a7..5d8f3a6db 100644 --- a/tests/objects/__snapshots__/jsfmt.spec.js.snap +++ b/tests/objects/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`expand.js 1`] = ` +exports[`expand.js-babylon 1`] = ` "const Component1 = ({ props }) => ( Test ); @@ -17,7 +17,7 @@ const Component2 = ({ props }) => Test; " `; -exports[`expression.js 1`] = ` +exports[`expression.js-babylon 1`] = ` "() => ({}\`\`); ({})\`\`; a = () => ({}).x; @@ -40,14 +40,14 @@ a = () => ({}.x); " `; -exports[`method.js 1`] = ` +exports[`method.js-babylon 1`] = ` "a = { f() {} } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a = { f() {} }; " `; -exports[`range.js 1`] = ` +exports[`range.js-babylon 1`] = ` "group( concat([ \\"(\\", diff --git a/tests/optional-type-name/__snapshots__/jsfmt.spec.js.snap b/tests/optional-type-name/__snapshots__/jsfmt.spec.js.snap index e06a66ec8..60fc8078a 100644 --- a/tests/optional-type-name/__snapshots__/jsfmt.spec.js.snap +++ b/tests/optional-type-name/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type Foo = (any) => string type Bar = { [string]: number } diff --git a/tests/preserve_line/__snapshots__/jsfmt.spec.js.snap b/tests/preserve_line/__snapshots__/jsfmt.spec.js.snap index 68aa4eb2a..fc023eb7e 100644 --- a/tests/preserve_line/__snapshots__/jsfmt.spec.js.snap +++ b/tests/preserve_line/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`comments.js 1`] = ` +exports[`comments.js-flow 1`] = ` "function a() { const a = 5; // comment @@ -61,7 +61,7 @@ function a() { " `; -exports[`comments.js 2`] = ` +exports[`comments.js-typescript 1`] = ` "function a() { const a = 5; // comment diff --git a/tests/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/quotes/__snapshots__/jsfmt.spec.js.snap index e055dd5ee..268b06e2b 100644 --- a/tests/quotes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/quotes/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`functions.js 1`] = ` +exports[`functions.js-flow 1`] = ` "const a = () => \\"Foo bar\\"; function b(object, key) { @@ -15,7 +15,7 @@ function b(object, key) { " `; -exports[`functions.js 2`] = ` +exports[`functions.js-flow 2`] = ` "const a = () => \\"Foo bar\\"; function b(object, key) { @@ -30,7 +30,7 @@ function b(object, key) { " `; -exports[`strings.js 1`] = ` +exports[`strings.js-flow 1`] = ` "// Every string will be changed to double quotes, unless we end up with fewer // escaped quotes by using single quotes. (Vice versa if the \\"singleQuote\\" // option is true). @@ -147,7 +147,7 @@ exports[`strings.js 1`] = ` " `; -exports[`strings.js 2`] = ` +exports[`strings.js-flow 2`] = ` "// Every string will be changed to double quotes, unless we end up with fewer // escaped quotes by using single quotes. (Vice versa if the \\"singleQuote\\" // option is true). diff --git a/tests/require/__snapshots__/jsfmt.spec.js.snap b/tests/require/__snapshots__/jsfmt.spec.js.snap index 2cc0c6b02..89d586c55 100644 --- a/tests/require/__snapshots__/jsfmt.spec.js.snap +++ b/tests/require/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`require.js 1`] = ` +exports[`require.js-flow 1`] = ` "const { one, two, thee, four, five, six, seven, eight, nine, ten } = require('./my-utils'); const { one, two, thee, four, five, six, seven, eight, nine, ten, eleven } = require('./my-utils'); @@ -36,7 +36,7 @@ const MyReallyExtrememlyLongModuleName = require(\\"MyReallyExtrememlyLongModule " `; -exports[`require.js 2`] = ` +exports[`require.js-typescript 1`] = ` "const { one, two, thee, four, five, six, seven, eight, nine, ten } = require('./my-utils'); const { one, two, thee, four, five, six, seven, eight, nine, ten, eleven } = require('./my-utils'); diff --git a/tests/rest/__snapshots__/jsfmt.spec.js.snap b/tests/rest/__snapshots__/jsfmt.spec.js.snap index d723daef3..a8dbb1ed7 100644 --- a/tests/rest/__snapshots__/jsfmt.spec.js.snap +++ b/tests/rest/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`trailing-commas.js 1`] = ` +exports[`trailing-commas.js-flow 1`] = ` "declare class C { f( superSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLong, diff --git a/tests/return/__snapshots__/jsfmt.spec.js.snap b/tests/return/__snapshots__/jsfmt.spec.js.snap index c9fac0ee1..3ee0b6cd5 100644 --- a/tests/return/__snapshots__/jsfmt.spec.js.snap +++ b/tests/return/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`binaryish.js 1`] = ` +exports[`binaryish.js-flow 1`] = ` "function f() { return ( property.isIdentifier() && diff --git a/tests/shebang/__snapshots__/jsfmt.spec.js.snap b/tests/shebang/__snapshots__/jsfmt.spec.js.snap index ee799cb7e..4b9e87c10 100644 --- a/tests/shebang/__snapshots__/jsfmt.spec.js.snap +++ b/tests/shebang/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`shebang.js 1`] = ` +exports[`shebang.js-flow 1`] = ` "#!/usr/bin/env node function a() {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -9,7 +9,7 @@ function a() {} " `; -exports[`shebang.js 2`] = ` +exports[`shebang.js-typescript 1`] = ` "#!/usr/bin/env node function a() {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -18,7 +18,7 @@ function a() {} " `; -exports[`shebang-newline.js 1`] = ` +exports[`shebang-newline.js-flow 1`] = ` "#!/usr/bin/env node function a() {} @@ -29,7 +29,7 @@ function a() {} " `; -exports[`shebang-newline.js 2`] = ` +exports[`shebang-newline.js-typescript 1`] = ` "#!/usr/bin/env node function a() {} diff --git a/tests/strings/__snapshots__/jsfmt.spec.js.snap b/tests/strings/__snapshots__/jsfmt.spec.js.snap index 44d7a05d8..35610770c 100644 --- a/tests/strings/__snapshots__/jsfmt.spec.js.snap +++ b/tests/strings/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`strings.js 1`] = ` +exports[`strings.js-flow 1`] = ` "[ \\"abc\\", 'abc', @@ -54,7 +54,7 @@ exports[`strings.js 1`] = ` " `; -exports[`strings.js 2`] = ` +exports[`strings.js-flow 2`] = ` "[ \\"abc\\", 'abc', @@ -108,7 +108,7 @@ exports[`strings.js 2`] = ` " `; -exports[`template-literals.js 1`] = ` +exports[`template-literals.js-flow 1`] = ` "foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 } with expr\`); const x = \`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() {return 3 })() + 3 + 2 + 3 + 2 + 3 } with expr\`; @@ -145,7 +145,7 @@ pipe.write( " `; -exports[`template-literals.js 2`] = ` +exports[`template-literals.js-flow 2`] = ` "foo(\`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 } with expr\`); const x = \`a long string \${ 1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + ( function() {return 3 })() + 3 + 2 + 3 + 2 + 3 } with expr\`; diff --git a/tests/switch/__snapshots__/jsfmt.spec.js.snap b/tests/switch/__snapshots__/jsfmt.spec.js.snap index 57d35be47..338a0e0ee 100644 --- a/tests/switch/__snapshots__/jsfmt.spec.js.snap +++ b/tests/switch/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`empty_switch.js 1`] = ` +exports[`empty_switch.js-flow 1`] = ` "switch (1) { default:; } switch (1) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -12,7 +12,7 @@ switch (1) { " `; -exports[`empty_switch.js 2`] = ` +exports[`empty_switch.js-typescript 1`] = ` "switch (1) { default:; } switch (1) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/tabWith/__snapshots__/jsfmt.spec.js.snap b/tests/tabWith/__snapshots__/jsfmt.spec.js.snap index 2270b72f2..c62d6dc36 100644 --- a/tests/tabWith/__snapshots__/jsfmt.spec.js.snap +++ b/tests/tabWith/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`class.js 1`] = ` +exports[`class.js-flow 1`] = ` "class A { method() { var x = 1; @@ -25,7 +25,7 @@ class A { " `; -exports[`class.js 2`] = ` +exports[`class.js-flow 2`] = ` "class A { method() { var x = 1; @@ -50,7 +50,7 @@ class A { " `; -exports[`nested-functions.spec.js 1`] = ` +exports[`nested-functions.spec.js-flow 1`] = ` "const c = () => {}; function a() { @@ -77,7 +77,7 @@ function a() { " `; -exports[`nested-functions.spec.js 2`] = ` +exports[`nested-functions.spec.js-flow 2`] = ` "const c = () => {}; function a() { diff --git a/tests/template/__snapshots__/jsfmt.spec.js.snap b/tests/template/__snapshots__/jsfmt.spec.js.snap index 39ac372fb..cacbbfb6e 100644 --- a/tests/template/__snapshots__/jsfmt.spec.js.snap +++ b/tests/template/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`faulty-locations.js 1`] = ` +exports[`faulty-locations.js-flow 1`] = ` "var o = { [\`key\`]: () => { // Comment @@ -33,7 +33,7 @@ var x = { " `; -exports[`faulty-locations.js 2`] = ` +exports[`faulty-locations.js-typescript 1`] = ` "var o = { [\`key\`]: () => { // Comment @@ -66,7 +66,7 @@ var x = { " `; -exports[`parenthesis.js 1`] = ` +exports[`parenthesis.js-flow 1`] = ` "// \\"ArrowFunctionExpression\\" (() => {})\`\`; @@ -179,7 +179,7 @@ function* f() { " `; -exports[`parenthesis.js 2`] = ` +exports[`parenthesis.js-typescript 1`] = ` "// \\"ArrowFunctionExpression\\" (() => {})\`\`; diff --git a/tests/ternaries/__snapshots__/jsfmt.spec.js.snap b/tests/ternaries/__snapshots__/jsfmt.spec.js.snap index d4cdad92b..12c847462 100644 --- a/tests/ternaries/__snapshots__/jsfmt.spec.js.snap +++ b/tests/ternaries/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "const obj0 = conditionIsTruthy ? shortThing : otherShortThing const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing @@ -52,7 +52,7 @@ const obj5 = conditionIsTruthy " `; -exports[`test.js 2`] = ` +exports[`test.js-flow 2`] = ` "const obj0 = conditionIsTruthy ? shortThing : otherShortThing const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing @@ -104,7 +104,7 @@ const obj5 = conditionIsTruthy " `; -exports[`test.js 3`] = ` +exports[`test.js-typescript 1`] = ` "const obj0 = conditionIsTruthy ? shortThing : otherShortThing const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing @@ -156,7 +156,7 @@ const obj5 = conditionIsTruthy " `; -exports[`test.js 4`] = ` +exports[`test.js-typescript 2`] = ` "const obj0 = conditionIsTruthy ? shortThing : otherShortThing const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing diff --git a/tests/test_declarations/__snapshots__/jsfmt.spec.js.snap b/tests/test_declarations/__snapshots__/jsfmt.spec.js.snap index e52cda389..37c88af2c 100644 --- a/tests/test_declarations/__snapshots__/jsfmt.spec.js.snap +++ b/tests/test_declarations/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test_declarations.js 1`] = ` +exports[`test_declarations.js-flow 1`] = ` "// Shouldn't break it(\\"does something really long and complicated so I have to write a very long name for the test\\", () => { @@ -153,7 +153,7 @@ it.only.only( " `; -exports[`test_declarations.js 2`] = ` +exports[`test_declarations.js-typescript 1`] = ` "// Shouldn't break it(\\"does something really long and complicated so I have to write a very long name for the test\\", () => { diff --git a/tests/trailing_comma/__snapshots__/jsfmt.spec.js.snap b/tests/trailing_comma/__snapshots__/jsfmt.spec.js.snap index dc2d9623a..8c7bff75d 100644 --- a/tests/trailing_comma/__snapshots__/jsfmt.spec.js.snap +++ b/tests/trailing_comma/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`es5.js 1`] = ` +exports[`es5.js-flow 1`] = ` "function send_single_email( app, email_id, @@ -39,7 +39,7 @@ function send_single_email( " `; -exports[`es5.js 2`] = ` +exports[`es5.js-flow 2`] = ` "function send_single_email( app, email_id, @@ -78,7 +78,7 @@ function send_single_email( " `; -exports[`es5.js 3`] = ` +exports[`es5.js-flow 3`] = ` "function send_single_email( app, email_id, @@ -117,7 +117,7 @@ function send_single_email( " `; -exports[`es5.js 4`] = ` +exports[`es5.js-typescript 1`] = ` "function send_single_email( app, email_id, @@ -156,7 +156,7 @@ function send_single_email( " `; -exports[`es5.js 5`] = ` +exports[`es5.js-typescript 2`] = ` "function send_single_email( app, email_id, @@ -195,7 +195,7 @@ function send_single_email( " `; -exports[`es5.js 6`] = ` +exports[`es5.js-typescript 3`] = ` "function send_single_email( app, email_id, @@ -234,7 +234,7 @@ function send_single_email( " `; -exports[`function-calls.js 1`] = ` +exports[`function-calls.js-flow 1`] = ` "const a = (param1, param2, param3) => {} a('value', 'value2', 'value3'); @@ -265,7 +265,7 @@ a( " `; -exports[`function-calls.js 2`] = ` +exports[`function-calls.js-flow 2`] = ` "const a = (param1, param2, param3) => {} a('value', 'value2', 'value3'); @@ -296,7 +296,7 @@ a( " `; -exports[`function-calls.js 3`] = ` +exports[`function-calls.js-flow 3`] = ` "const a = (param1, param2, param3) => {} a('value', 'value2', 'value3'); @@ -327,7 +327,7 @@ a( " `; -exports[`function-calls.js 4`] = ` +exports[`function-calls.js-typescript 1`] = ` "const a = (param1, param2, param3) => {} a('value', 'value2', 'value3'); @@ -358,7 +358,7 @@ a( " `; -exports[`function-calls.js 5`] = ` +exports[`function-calls.js-typescript 2`] = ` "const a = (param1, param2, param3) => {} a('value', 'value2', 'value3'); @@ -389,7 +389,7 @@ a( " `; -exports[`function-calls.js 6`] = ` +exports[`function-calls.js-typescript 3`] = ` "const a = (param1, param2, param3) => {} a('value', 'value2', 'value3'); @@ -420,7 +420,7 @@ a( " `; -exports[`object.js 1`] = ` +exports[`object.js-flow 1`] = ` "const a = { b: true, c: { @@ -467,7 +467,7 @@ const aLong = { " `; -exports[`object.js 2`] = ` +exports[`object.js-flow 2`] = ` "const a = { b: true, c: { @@ -514,7 +514,7 @@ const aLong = { " `; -exports[`object.js 3`] = ` +exports[`object.js-flow 3`] = ` "const a = { b: true, c: { @@ -561,7 +561,7 @@ const aLong = { " `; -exports[`object.js 4`] = ` +exports[`object.js-typescript 1`] = ` "const a = { b: true, c: { @@ -608,7 +608,7 @@ const aLong = { " `; -exports[`object.js 5`] = ` +exports[`object.js-typescript 2`] = ` "const a = { b: true, c: { @@ -655,7 +655,7 @@ const aLong = { " `; -exports[`object.js 6`] = ` +exports[`object.js-typescript 3`] = ` "const a = { b: true, c: { @@ -702,7 +702,7 @@ const aLong = { " `; -exports[`trailing_whitespace.js 1`] = ` +exports[`trailing_whitespace.js-flow 1`] = ` "let example = [ 'FOO', 'BAR', @@ -778,7 +778,7 @@ function supersupersupersuperLongF( " `; -exports[`trailing_whitespace.js 2`] = ` +exports[`trailing_whitespace.js-flow 2`] = ` "let example = [ 'FOO', 'BAR', @@ -854,7 +854,7 @@ function supersupersupersuperLongF( " `; -exports[`trailing_whitespace.js 3`] = ` +exports[`trailing_whitespace.js-flow 3`] = ` "let example = [ 'FOO', 'BAR', @@ -930,7 +930,7 @@ function supersupersupersuperLongF( " `; -exports[`trailing_whitespace.js 4`] = ` +exports[`trailing_whitespace.js-typescript 1`] = ` "let example = [ 'FOO', 'BAR', @@ -1006,7 +1006,7 @@ function supersupersupersuperLongF( " `; -exports[`trailing_whitespace.js 5`] = ` +exports[`trailing_whitespace.js-typescript 2`] = ` "let example = [ 'FOO', 'BAR', @@ -1082,7 +1082,7 @@ function supersupersupersuperLongF( " `; -exports[`trailing_whitespace.js 6`] = ` +exports[`trailing_whitespace.js-typescript 3`] = ` "let example = [ 'FOO', 'BAR', diff --git a/tests/trailing_whitespace/__snapshots__/jsfmt.spec.js.snap b/tests/trailing_whitespace/__snapshots__/jsfmt.spec.js.snap index fdbdef959..e5850805f 100644 --- a/tests/trailing_whitespace/__snapshots__/jsfmt.spec.js.snap +++ b/tests/trailing_whitespace/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`trailing.js 1`] = ` +exports[`trailing.js-flow 1`] = ` "export type Result = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" }; // Note: there are trailing whitespace in this file diff --git a/tests/try/__snapshots__/jsfmt.spec.js.snap b/tests/try/__snapshots__/jsfmt.spec.js.snap index 77187de16..3d613725a 100644 --- a/tests/try/__snapshots__/jsfmt.spec.js.snap +++ b/tests/try/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`empty.js 1`] = ` +exports[`empty.js-flow 1`] = ` "try { } catch (e) { } @@ -21,7 +21,7 @@ try { " `; -exports[`empty.js 2`] = ` +exports[`empty.js-typescript 1`] = ` "try { } catch (e) { } @@ -42,7 +42,7 @@ try { " `; -exports[`try.js 1`] = ` +exports[`try.js-flow 1`] = ` "try /* missing comment */ {;} @@ -55,7 +55,7 @@ try { " `; -exports[`try.js 2`] = ` +exports[`try.js-typescript 1`] = ` "try /* missing comment */ {;} diff --git a/tests/typescript/conformance/types/any/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/conformance/types/any/__snapshots__/jsfmt.spec.js.snap index 962556c33..0597805a9 100644 --- a/tests/typescript/conformance/types/any/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/conformance/types/any/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`anyAsConstructor.ts 1`] = ` +exports[`anyAsConstructor.ts-typescript 1`] = ` "// any is considered an untyped function call // can be called except with type arguments which is an error @@ -25,7 +25,7 @@ var d = new x(x); // no error " `; -exports[`anyAsFunctionCall.ts 1`] = ` +exports[`anyAsFunctionCall.ts-typescript 1`] = ` "// any is considered an untyped function call // can be called except with type arguments which is an error @@ -44,7 +44,7 @@ var c = x(x); " `; -exports[`anyAsGenericFunctionCall.ts 1`] = ` +exports[`anyAsGenericFunctionCall.ts-typescript 1`] = ` "// any is considered an untyped function call // can be called except with type arguments which is an error @@ -73,7 +73,7 @@ var d = x(x); " `; -exports[`anyPropertyAccess.ts 1`] = ` +exports[`anyPropertyAccess.ts-typescript 1`] = ` "var x: any; var a = x.foo; var b = x['foo']; diff --git a/tests/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap index 3285f3a24..a5b4b3e72 100644 --- a/tests/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/conformance/types/functions/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`functionImplementationErrors.ts 1`] = ` +exports[`functionImplementationErrors.ts-typescript 1`] = ` "// @allowUnreachableCode: true // FunctionExpression with no return type annotation with multiple return statements with unrelated types @@ -160,7 +160,7 @@ var f13 = () => { " `; -exports[`functionImplementations.ts 1`] = ` +exports[`functionImplementations.ts-typescript 1`] = ` "// @allowUnreachableCode: true // FunctionExpression with no return type annotation and no return statement returns void @@ -501,7 +501,7 @@ var f12: (x: number) => any = x => { " `; -exports[`functionOverloadCompatibilityWithVoid01.ts 1`] = ` +exports[`functionOverloadCompatibilityWithVoid01.ts-typescript 1`] = ` "function f(x: string): number; function f(x: string): void { return; @@ -514,7 +514,7 @@ function f(x: string): void { " `; -exports[`functionOverloadCompatibilityWithVoid02.ts 1`] = ` +exports[`functionOverloadCompatibilityWithVoid02.ts-typescript 1`] = ` "function f(x: string): void; function f(x: string): number { return 0; @@ -527,7 +527,7 @@ function f(x: string): number { " `; -exports[`functionOverloadCompatibilityWithVoid03.ts 1`] = ` +exports[`functionOverloadCompatibilityWithVoid03.ts-typescript 1`] = ` "function f(x: string): void; function f(x: string): void { return; @@ -540,7 +540,7 @@ function f(x: string): void { " `; -exports[`functionOverloadErrorsSyntax.ts 1`] = ` +exports[`functionOverloadErrorsSyntax.ts-typescript 1`] = ` "//Function overload signature with optional parameter followed by non-optional parameter function fn4a(x?: number, y: string); function fn4a() { } @@ -565,7 +565,7 @@ function fn5() {} " `; -exports[`parameterInitializersForwardReferencing.ts 1`] = ` +exports[`parameterInitializersForwardReferencing.ts-typescript 1`] = ` "function left(a, b = a, c = b) { a; b; diff --git a/tests/typescript/conformance/types/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/conformance/types/tuple/__snapshots__/jsfmt.spec.js.snap index 2ce504a67..9df09f27e 100644 --- a/tests/typescript/conformance/types/tuple/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/conformance/types/tuple/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`contextualTypeWithTuple.ts 1`] = ` +exports[`contextualTypeWithTuple.ts-typescript 1`] = ` "// no error var numStrTuple: [number, string] = [5, \\"hello\\"]; var numStrTuple2: [number, string] = [5, \\"foo\\", true]; @@ -55,7 +55,7 @@ numStrTuple = unionTuple3; " `; -exports[`indexerWithTuple.ts 1`] = ` +exports[`indexerWithTuple.ts-typescript 1`] = ` "var strNumTuple: [string, number] = [\\"foo\\", 10]; var numTupleTuple: [number, [string, number]] = [10, [\\"bar\\", 20]]; var unionTuple1: [number, string| number] = [10, \\"foo\\"]; @@ -124,35 +124,35 @@ var eleUnion26 = unionTuple2[\\"1\\"]; // string | number " `; -exports[`tupleElementTypes1.ts 1`] = ` +exports[`tupleElementTypes1.ts-typescript 1`] = ` "var [a, b]: [number, any] = [undefined, undefined]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var [a, b]: [number, any] = [undefined, undefined]; " `; -exports[`tupleElementTypes2.ts 1`] = ` +exports[`tupleElementTypes2.ts-typescript 1`] = ` "function f([a, b]: [number, any]) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function f([a, b]: [number, any]) {} " `; -exports[`tupleElementTypes3.ts 1`] = ` +exports[`tupleElementTypes3.ts-typescript 1`] = ` "var [a, b] = [0, undefined]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var [a, b] = [0, undefined]; " `; -exports[`tupleElementTypes4.ts 1`] = ` +exports[`tupleElementTypes4.ts-typescript 1`] = ` "function f([a, b] = [0, undefined]) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function f([a, b] = [0, undefined]) {} " `; -exports[`typeInferenceWithTupleType.ts 1`] = ` +exports[`typeInferenceWithTupleType.ts-typescript 1`] = ` "function combine(x: T, y: U): [T, U] { return [x, y]; } @@ -204,7 +204,7 @@ var zipResultEleEle = zipResult[0][0]; // string " `; -exports[`wideningTuples1.ts 1`] = ` +exports[`wideningTuples1.ts-typescript 1`] = ` "//@noImplicitAny: true declare function foo(x: T): T; @@ -219,7 +219,7 @@ y = [\\"\\"]; " `; -exports[`wideningTuples2.ts 1`] = ` +exports[`wideningTuples2.ts-typescript 1`] = ` "//@noImplicitAny: true var foo: () => [any] = function bar() { let intermediate = bar(); @@ -236,7 +236,7 @@ var foo: () => [any] = function bar() { " `; -exports[`wideningTuples3.ts 1`] = ` +exports[`wideningTuples3.ts-typescript 1`] = ` "//@noImplicitAny: true var a: [any]; @@ -249,7 +249,7 @@ var b = (a = [undefined, null]); " `; -exports[`wideningTuples4.ts 1`] = ` +exports[`wideningTuples4.ts-typescript 1`] = ` "var a: [any]; var b = a = [undefined, null]; @@ -262,7 +262,7 @@ b = [\\"\\", \\"\\"]; " `; -exports[`wideningTuples5.ts 1`] = ` +exports[`wideningTuples5.ts-typescript 1`] = ` "//@noImplicitAny: true var [a, b] = [undefined, null]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -271,7 +271,7 @@ var [a, b] = [undefined, null]; " `; -exports[`wideningTuples6.ts 1`] = ` +exports[`wideningTuples6.ts-typescript 1`] = ` "var [a, b] = [undefined, null]; a = \\"\\"; b = \\"\\"; @@ -282,7 +282,7 @@ b = \\"\\"; " `; -exports[`wideningTuples7.ts 1`] = ` +exports[`wideningTuples7.ts-typescript 1`] = ` "//@noImplicitAny: true var foo = function bar() { let intermediate: [string]; diff --git a/tests/typescript/conformance/types/tuple/emptyTuples/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/conformance/types/tuple/emptyTuples/__snapshots__/jsfmt.spec.js.snap index 983dc8193..27cc6e515 100644 --- a/tests/typescript/conformance/types/tuple/emptyTuples/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/conformance/types/tuple/emptyTuples/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`emptyTuplesTypeAssertion02.ts 1`] = ` +exports[`emptyTuplesTypeAssertion02.ts-typescript 1`] = ` "// @declaration: true let x = [] as []; diff --git a/tests/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/jsfmt.spec.js.snap index 424061b96..f55af91a9 100644 --- a/tests/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/conformance/types/typeParameters/typeParameterLists/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`innerTypeParameterShadowingOuterOne.ts 1`] = ` +exports[`innerTypeParameterShadowingOuterOne.ts-typescript 1`] = ` "// inner type parameters shadow outer ones of the same name // no errors expected @@ -61,7 +61,7 @@ function f2() { " `; -exports[`innerTypeParameterShadowingOuterOne2.ts 1`] = ` +exports[`innerTypeParameterShadowingOuterOne2.ts-typescript 1`] = ` "// inner type parameters shadow outer ones of the same name // no errors expected @@ -140,7 +140,7 @@ class C2 { " `; -exports[`staticMembersUsingClassTypeParameter.ts 1`] = ` +exports[`staticMembersUsingClassTypeParameter.ts-typescript 1`] = ` "// BUG 745747 class C { static x: T; @@ -175,7 +175,7 @@ class C3 { " `; -exports[`typeParametersAvailableInNestedScope2.ts 1`] = ` +exports[`typeParametersAvailableInNestedScope2.ts-typescript 1`] = ` "function foo(x: T, y: U) { function bar(z: V) { function baz(a: W) { diff --git a/tests/typescript/conformance/types/union/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/conformance/types/union/__snapshots__/jsfmt.spec.js.snap index 1c81c780d..1ae84c428 100644 --- a/tests/typescript/conformance/types/union/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/conformance/types/union/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`unionTypeCallSignatures.ts 1`] = ` +exports[`unionTypeCallSignatures.ts-typescript 1`] = ` "var numOrDate: number | Date; var strOrBoolean: string | boolean; var strOrNum: string | number; @@ -175,7 +175,7 @@ strOrNum = unionWithRestParameter4(\\"hello\\", \\"world\\"); " `; -exports[`unionTypeCallSignatures3.ts 1`] = ` +exports[`unionTypeCallSignatures3.ts-typescript 1`] = ` "function f1(s: string) { } function f2(s?: string) { } function f3(...s: string[]) { } @@ -209,7 +209,7 @@ fUnion(\\"\\"); // All constituents can be called by passing a single string. " `; -exports[`unionTypeCallSignatures4.ts 1`] = ` +exports[`unionTypeCallSignatures4.ts-typescript 1`] = ` "type F1 = (a: string, b?: string) => void; type F2 = (a: string, b?: string, c?: string) => void; type F3 = (a: string, ...rest: string[]) => void; @@ -264,7 +264,7 @@ f12345(\\"a\\", \\"b\\", \\"c\\"); // error " `; -exports[`unionTypeConstructSignatures.ts 1`] = ` +exports[`unionTypeConstructSignatures.ts-typescript 1`] = ` "var numOrDate: number | Date; var strOrBoolean: string | boolean; var strOrNum: string | number; @@ -431,7 +431,7 @@ strOrNum = new unionWithRestParameter3(); // error no call signature " `; -exports[`unionTypeEquivalence.ts 1`] = ` +exports[`unionTypeEquivalence.ts-typescript 1`] = ` "// A | B is equivalent to A if B is a subtype of A class C { } class D extends C { foo() { } } @@ -474,7 +474,7 @@ var z1: string | typeof BC; " `; -exports[`unionTypeFromArrayLiteral.ts 1`] = ` +exports[`unionTypeFromArrayLiteral.ts-typescript 1`] = ` "// The resulting type an array literal expression is determined as follows: // If the array literal is empty, the resulting type is an array type with the element type Undefined. // Otherwise, if the array literal is contextually typed by a type that has a property with the numeric name ‘0’, the resulting type is a tuple type constructed from the types of the element expressions. @@ -533,7 +533,7 @@ var arr9 = [e, f]; // (E|F)[] " `; -exports[`unionTypeIndexSignature.ts 1`] = ` +exports[`unionTypeIndexSignature.ts-typescript 1`] = ` "var numOrDate: number | Date; var anyVar: number; @@ -590,7 +590,7 @@ anyVar = unionOfTypesWithAndWithoutStringSignature1[10]; // any " `; -exports[`unionTypePropertyAccessibility.ts 1`] = ` +exports[`unionTypePropertyAccessibility.ts-typescript 1`] = ` "class Default { member: string; } diff --git a/tests/unary/__snapshots__/jsfmt.spec.js.snap b/tests/unary/__snapshots__/jsfmt.spec.js.snap index 1868258ab..6ce696f0f 100644 --- a/tests/unary/__snapshots__/jsfmt.spec.js.snap +++ b/tests/unary/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`object.js 1`] = ` +exports[`object.js-flow 1`] = ` "state = { // students hoverColumn: -1 @@ -13,7 +13,7 @@ state = { " `; -exports[`object.js 2`] = ` +exports[`object.js-typescript 1`] = ` "state = { // students hoverColumn: -1 @@ -26,7 +26,7 @@ state = { " `; -exports[`series.js 1`] = ` +exports[`series.js-flow 1`] = ` "1 + ++x; 1 + x++; @@ -65,7 +65,7 @@ x-- - 1; " `; -exports[`series.js 2`] = ` +exports[`series.js-typescript 1`] = ` "1 + ++x; 1 + x++; diff --git a/tests/unary_expression/__snapshots__/jsfmt.spec.js.snap b/tests/unary_expression/__snapshots__/jsfmt.spec.js.snap index d23cc4c30..807d65849 100644 --- a/tests/unary_expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/unary_expression/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`urnary_expression.js 1`] = ` +exports[`urnary_expression.js-flow 1`] = ` "!!x x++ x--; @@ -21,7 +21,7 @@ x * +y; " `; -exports[`urnary_expression.js 2`] = ` +exports[`urnary_expression.js-typescript 1`] = ` "!!x x++ x--; diff --git a/tests/unicode/__snapshots__/jsfmt.spec.js.snap b/tests/unicode/__snapshots__/jsfmt.spec.js.snap index 69006e423..de7feded0 100644 --- a/tests/unicode/__snapshots__/jsfmt.spec.js.snap +++ b/tests/unicode/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`keys.js 1`] = ` +exports[`keys.js-flow 1`] = ` "({'この事はつもり素晴らしいことさ': '35jL9V'}) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ({ \\"この事はつもり素晴らしいことさ\\": \\"35jL9V\\" }); diff --git a/tests/union_intersection/__snapshots__/jsfmt.spec.js.snap b/tests/union_intersection/__snapshots__/jsfmt.spec.js.snap index 520c0c149..263682578 100644 --- a/tests/union_intersection/__snapshots__/jsfmt.spec.js.snap +++ b/tests/union_intersection/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`test.js 1`] = ` +exports[`test.js-flow 1`] = ` "type T5 = \\"1\\" | \\"2\\" | \\"3\\" | \\"4\\" | \\"5\\" | \\"6\\" | \\"7\\" | \\"8\\" | \\"9\\" | \\"10\\" | \\"11\\" | \\"12\\" | \\"13\\"; type T6 = \\"a-long-string\\" | \\"another-long-string\\" | \\"yet-another-long-string\\" | \\"one-more-for-good-measure\\"; diff --git a/tests/update_expression/__snapshots__/jsfmt.spec.js.snap b/tests/update_expression/__snapshots__/jsfmt.spec.js.snap index 1d0217054..30af9f402 100644 --- a/tests/update_expression/__snapshots__/jsfmt.spec.js.snap +++ b/tests/update_expression/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`update_expression.js 1`] = ` +exports[`update_expression.js-flow 1`] = ` "(this.x++).toString() new (r++); (x++)(); @@ -13,7 +13,7 @@ const uuid = String(this._uuidCounter++); " `; -exports[`update_expression.js 2`] = ` +exports[`update_expression.js-typescript 1`] = ` "(this.x++).toString() new (r++); (x++)(); diff --git a/tests/while/__snapshots__/jsfmt.spec.js.snap b/tests/while/__snapshots__/jsfmt.spec.js.snap index 11d7214bb..03192ac79 100644 --- a/tests/while/__snapshots__/jsfmt.spec.js.snap +++ b/tests/while/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`indent.js 1`] = ` +exports[`indent.js-flow 1`] = ` "if (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -21,7 +21,7 @@ while ( " `; -exports[`indent.js 2`] = ` +exports[`indent.js-typescript 1`] = ` "if (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} while (someVeryLongStringA && someVeryLongStringB && someVeryLongStringC && someVeryLongStringD) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/windows/__snapshots__/jsfmt.spec.js.snap b/tests/windows/__snapshots__/jsfmt.spec.js.snap index 6b0016a15..9f1607450 100644 --- a/tests/windows/__snapshots__/jsfmt.spec.js.snap +++ b/tests/windows/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`line-ending.js 1`] = ` +exports[`line-ending.js-flow 1`] = ` "this; has; windows; @@ -15,7 +15,7 @@ endings; " `; -exports[`line-ending.js 2`] = ` +exports[`line-ending.js-typescript 1`] = ` "this; has; windows; diff --git a/tests/yield/__snapshots__/jsfmt.spec.js.snap b/tests/yield/__snapshots__/jsfmt.spec.js.snap index f2dee0e07..9fbe169d5 100644 --- a/tests/yield/__snapshots__/jsfmt.spec.js.snap +++ b/tests/yield/__snapshots__/jsfmt.spec.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`conditional.js 1`] = ` +exports[`conditional.js-babylon 1`] = ` "function* f() { a = (yield) ? 1 : 1; a = yield 1 ? 1 : 1; @@ -43,7 +43,7 @@ async function f() { " `; -exports[`conditional.js 2`] = ` +exports[`conditional.js-typescript 1`] = ` "function* f() { a = (yield) ? 1 : 1; a = yield 1 ? 1 : 1; diff --git a/tests_config/run_spec.js b/tests_config/run_spec.js index a8c1469de..e7fffd3a1 100644 --- a/tests_config/run_spec.js +++ b/tests_config/run_spec.js @@ -18,6 +18,13 @@ function removeEmptyStatements(ast) { }); } +function getParserOrDefault(options) { + if (!options || !options.parser) { + return 'flow'; + } + return options.parser; +} + function run_spec(dirname, options) { fs.readdirSync(dirname).forEach(filename => { if ((filename.endsWith('.js') || filename.endsWith('.ts')) && filename !== 'jsfmt.spec.js') { @@ -26,7 +33,8 @@ function run_spec(dirname, options) { if (!RUN_AST_TESTS) { const source = read(path).replace(/\r\n/g, '\n'); const output = prettyprint(source, path, options || {}); - test(filename, () => { + const parserFilename = filename + "-" + getParserOrDefault(options); + test(parserFilename, () => { expect(source + '~'.repeat(80) + '\n' + output).toMatchSnapshot(); }); } @@ -82,7 +90,7 @@ function parse(string) { function prettyprint(src, filename, options) { return prettier.format(src, Object.assign({ filename, - parser: 'flow', + parser: getParserOrDefault(), printWidth: 80, }, options)); }