From ff81c2864b34809126c1c83bec67a9e6aff37b5f Mon Sep 17 00:00:00 2001 From: Mark Pedrotti Date: Thu, 29 Aug 2019 06:24:44 -0400 Subject: [PATCH] chore: Delete obsolete FlowFixMe comments (#8885) --- e2e/__tests__/__snapshots__/failures.test.ts.snap | 12 ++++++------ e2e/__tests__/detectOpenHandles.ts | 1 - e2e/__tests__/iterator-to-null-test.ts | 2 -- e2e/__tests__/snapshot.test.ts | 3 --- e2e/__tests__/snapshotMockFs.test.ts | 1 - e2e/__tests__/snapshotResolver.test.ts | 1 - e2e/__tests__/snapshotSerializers.test.ts | 1 - e2e/auto-clear-mocks/with-auto-clear/index.js | 2 -- e2e/bad-source-map/__tests__/badSourceMap.js | 2 -- e2e/clear-cache/__tests__/clearCache.test.js | 2 -- e2e/failures/macros.js | 2 -- .../with-empty-mock-name-not-called/index.js | 2 -- e2e/mock-names/with-empty-mock-name/index.js | 2 -- .../with-mock-name-call-times-fail/index.js | 2 -- .../with-mock-name-call-times-pass/index.js | 2 -- .../with-mock-name-not-called-fail/index.js | 2 -- .../with-mock-name-not-called-pass/index.js | 2 -- e2e/mock-names/with-mock-name-not-called/index.js | 2 -- e2e/mock-names/with-mock-name/index.js | 2 -- e2e/mock-names/without-mock-name-not-called/index.js | 2 -- e2e/mock-names/without-mock-name/index.js | 2 -- e2e/override-globals/index.js | 2 -- e2e/run-programmatically/index.js | 2 -- 23 files changed, 6 insertions(+), 47 deletions(-) diff --git a/e2e/__tests__/__snapshots__/failures.test.ts.snap b/e2e/__tests__/__snapshots__/failures.test.ts.snap index 02d7fa1921df..9d29554a17bc 100644 --- a/e2e/__tests__/__snapshots__/failures.test.ts.snap +++ b/e2e/__tests__/__snapshots__/failures.test.ts.snap @@ -265,14 +265,14 @@ FAIL __tests__/testMacro.test.js Expected: 2 Received: 1 - 10 | - 11 | module.exports = (one: any, two: any) => { - > 12 | expect(one).toEqual(two); + 8 | + 9 | module.exports = (one: any, two: any) => { + > 10 | expect(one).toEqual(two); | ^ - 13 | }; - 14 | + 11 | }; + 12 | - at toEqual (macros.js:12:15) + at toEqual (macros.js:10:15) at Object.shouldEqual (__tests__/testMacro.test.js:13:3) `; diff --git a/e2e/__tests__/detectOpenHandles.ts b/e2e/__tests__/detectOpenHandles.ts index 70420b49e21d..d5384d44feeb 100644 --- a/e2e/__tests__/detectOpenHandles.ts +++ b/e2e/__tests__/detectOpenHandles.ts @@ -9,7 +9,6 @@ import {wrap} from 'jest-snapshot-serializer-raw'; import runJest, {until} from '../runJest'; try { - // $FlowFixMe: Node core require('async_hooks'); } catch (e) { if (e.code === 'MODULE_NOT_FOUND') { diff --git a/e2e/__tests__/iterator-to-null-test.ts b/e2e/__tests__/iterator-to-null-test.ts index 228086d284e3..7272ec3c669a 100644 --- a/e2e/__tests__/iterator-to-null-test.ts +++ b/e2e/__tests__/iterator-to-null-test.ts @@ -8,9 +8,7 @@ 'use strict'; -// $FlowFixMe Array.prototype[Symbol.iterator] = null; -// $FlowFixMe String.prototype[Symbol.iterator] = null; test('modifying global object does not affect test runner', () => {}); diff --git a/e2e/__tests__/snapshot.test.ts b/e2e/__tests__/snapshot.test.ts index 0695c1fd422d..1cdc33c9a206 100644 --- a/e2e/__tests__/snapshot.test.ts +++ b/e2e/__tests__/snapshot.test.ts @@ -107,7 +107,6 @@ describe('Snapshot', () => { expect(json.numPendingTests).toBe(0); expect(result.status).toBe(0); - // $FlowFixMe dynamic require const content = require(snapshotFile); expect( content['snapshot is not influenced by previous counter 1'], @@ -238,7 +237,6 @@ describe('Snapshot', () => { it('works on subsequent runs without `-u`', () => { const firstRun = runWithJson('snapshot', ['-w=1', '--ci=false']); - // $FlowFixMe dynamic require const content = require(snapshotOfCopy); expect(content).not.toBe(undefined); const secondRun = runWithJson('snapshot', []); @@ -257,7 +255,6 @@ describe('Snapshot', () => { const firstRun = runWithJson('snapshot', ['-w=1', '--ci=false']); fs.unlinkSync(copyOfTestPath); - // $FlowFixMe dynamic require const content = require(snapshotOfCopy); expect(content).not.toBe(undefined); const secondRun = runWithJson('snapshot', ['-w=1', '--ci=false', '-u']); diff --git a/e2e/__tests__/snapshotMockFs.test.ts b/e2e/__tests__/snapshotMockFs.test.ts index a049e3905faa..8ac6c27cef6c 100644 --- a/e2e/__tests__/snapshotMockFs.test.ts +++ b/e2e/__tests__/snapshotMockFs.test.ts @@ -28,7 +28,6 @@ test('store snapshot even if fs is mocked', () => { expect(stderr).toMatch('1 snapshot written from 1 test suite.'); expect(wrap(extractSummary(stderr).summary)).toMatchSnapshot(); - // $FlowFixMe dynamic require const content = require(snapshotFile); expect(content['snapshot 1']).toBe(` Object { diff --git a/e2e/__tests__/snapshotResolver.test.ts b/e2e/__tests__/snapshotResolver.test.ts index e39fb88d3e73..f5c3a08a4b25 100644 --- a/e2e/__tests__/snapshotResolver.test.ts +++ b/e2e/__tests__/snapshotResolver.test.ts @@ -33,7 +33,6 @@ describe('Custom snapshot resolver', () => { expect(result.stderr).toMatch('1 snapshot written from 1 test suite'); - // $FlowFixMe dynamic require const content = require(snapshotFile); expect(content).toHaveProperty( 'snapshots are written to custom location 1', diff --git a/e2e/__tests__/snapshotSerializers.test.ts b/e2e/__tests__/snapshotSerializers.test.ts index 0e1e377a1d32..fa3b586dfbcb 100644 --- a/e2e/__tests__/snapshotSerializers.test.ts +++ b/e2e/__tests__/snapshotSerializers.test.ts @@ -33,7 +33,6 @@ describe('Snapshot serializers', () => { it('renders snapshot', () => { runAndAssert(); - // $FlowFixMe dynamic require const snapshot = require(snapshotPath); expect(snapshot).toMatchSnapshot(); }); diff --git a/e2e/auto-clear-mocks/with-auto-clear/index.js b/e2e/auto-clear-mocks/with-auto-clear/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/auto-clear-mocks/with-auto-clear/index.js +++ b/e2e/auto-clear-mocks/with-auto-clear/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/bad-source-map/__tests__/badSourceMap.js b/e2e/bad-source-map/__tests__/badSourceMap.js index f7e209e4f358..4216e15dffdf 100644 --- a/e2e/bad-source-map/__tests__/badSourceMap.js +++ b/e2e/bad-source-map/__tests__/badSourceMap.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ 'use strict'; diff --git a/e2e/clear-cache/__tests__/clearCache.test.js b/e2e/clear-cache/__tests__/clearCache.test.js index c8045e3e8510..3c0ad577c1b5 100644 --- a/e2e/clear-cache/__tests__/clearCache.test.js +++ b/e2e/clear-cache/__tests__/clearCache.test.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ 'use strict'; diff --git a/e2e/failures/macros.js b/e2e/failures/macros.js index 0c3d07ddcf73..5bebb7950c2c 100644 --- a/e2e/failures/macros.js +++ b/e2e/failures/macros.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ 'use strict'; diff --git a/e2e/mock-names/with-empty-mock-name-not-called/index.js b/e2e/mock-names/with-empty-mock-name-not-called/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-empty-mock-name-not-called/index.js +++ b/e2e/mock-names/with-empty-mock-name-not-called/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-empty-mock-name/index.js b/e2e/mock-names/with-empty-mock-name/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-empty-mock-name/index.js +++ b/e2e/mock-names/with-empty-mock-name/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-mock-name-call-times-fail/index.js b/e2e/mock-names/with-mock-name-call-times-fail/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-mock-name-call-times-fail/index.js +++ b/e2e/mock-names/with-mock-name-call-times-fail/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-mock-name-call-times-pass/index.js b/e2e/mock-names/with-mock-name-call-times-pass/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-mock-name-call-times-pass/index.js +++ b/e2e/mock-names/with-mock-name-call-times-pass/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-mock-name-not-called-fail/index.js b/e2e/mock-names/with-mock-name-not-called-fail/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-mock-name-not-called-fail/index.js +++ b/e2e/mock-names/with-mock-name-not-called-fail/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-mock-name-not-called-pass/index.js b/e2e/mock-names/with-mock-name-not-called-pass/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-mock-name-not-called-pass/index.js +++ b/e2e/mock-names/with-mock-name-not-called-pass/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-mock-name-not-called/index.js b/e2e/mock-names/with-mock-name-not-called/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-mock-name-not-called/index.js +++ b/e2e/mock-names/with-mock-name-not-called/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/with-mock-name/index.js b/e2e/mock-names/with-mock-name/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/with-mock-name/index.js +++ b/e2e/mock-names/with-mock-name/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/without-mock-name-not-called/index.js b/e2e/mock-names/without-mock-name-not-called/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/without-mock-name-not-called/index.js +++ b/e2e/mock-names/without-mock-name-not-called/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/mock-names/without-mock-name/index.js b/e2e/mock-names/without-mock-name/index.js index b0649a5ec989..3f40dc0d6bd1 100644 --- a/e2e/mock-names/without-mock-name/index.js +++ b/e2e/mock-names/without-mock-name/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ module.exports = () => {}; diff --git a/e2e/override-globals/index.js b/e2e/override-globals/index.js index 14aaa06fbd12..f7a1c8f975d9 100644 --- a/e2e/override-globals/index.js +++ b/e2e/override-globals/index.js @@ -3,8 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ global.Promise = function() { diff --git a/e2e/run-programmatically/index.js b/e2e/run-programmatically/index.js index b45fa0b0e585..fb35a26d185a 100644 --- a/e2e/run-programmatically/index.js +++ b/e2e/run-programmatically/index.js @@ -4,8 +4,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * - * @flow */ require('@babel/register');