diff --git a/packages/jest-cli/src/lib/__tests__/set_state.js b/packages/jest-cli/src/lib/__tests__/set_state.js deleted file mode 100644 index 973b3af6e3bc..000000000000 --- a/packages/jest-cli/src/lib/__tests__/set_state.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -'use strict'; - -const setState = require('../setState'); - -describe('setState()', () => { - it('Sets watch and watchAll flags based on the mode', () => { - let argv = {}; - setState(argv, 'watch', {}); - expect(argv.watch).toBeTruthy(); - expect(argv.watchAll).toBeFalsy(); - - argv = {}; - setState(argv, 'watchAll', {}); - expect(argv.watch).toBeFalsy(); - expect(argv.watchAll).toBeTruthy(); - }); - - it('Sets the onlyChanged flag then in watch and with no pattern', () => { - let argv = {}; - setState(argv, 'watch', {}); - expect(argv.onlyChanged).toBeTruthy(); - - argv = {testPathPattern: 'jest-cli'}; - setState(argv, 'watch', {}); - expect(argv.onlyChanged).toBeFalsy(); - - argv = {testNamePattern: 'name-test'}; - setState(argv, 'watch', {}); - expect(argv.onlyChanged).toBeFalsy(); - - argv = {}; - setState(argv, 'watchAll', {}); - expect(argv.onlyChanged).toBeFalsy(); - }); - - it('Sets the noSCM flag when the options specify it', () => { - let argv = {}; - setState(argv, 'watch', {noSCM: true}); - expect(argv.noSCM).toBeTruthy(); - - argv = {}; - setState(argv, 'watch', {noSCM: false}); - expect(argv.noSCM).toBeFalsy(); - }); -}); diff --git a/packages/jest-editor-support/src/__tests__/Snapshot-test.js b/packages/jest-editor-support/src/__tests__/snapshot.test.js similarity index 97% rename from packages/jest-editor-support/src/__tests__/Snapshot-test.js rename to packages/jest-editor-support/src/__tests__/snapshot.test.js index ca076a7ae800..b7974a5d2f54 100644 --- a/packages/jest-editor-support/src/__tests__/Snapshot-test.js +++ b/packages/jest-editor-support/src/__tests__/snapshot.test.js @@ -4,12 +4,15 @@ * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. + * + * @flow */ 'use strict'; -const path = require('path'); -const Snapshot = require('../Snapshot'); +import path from 'path'; +import Snapshot from '../Snapshot'; + const snapshotHelper = new Snapshot(); const snapshotFixturePath = path.resolve(__dirname, 'fixtures/snapshots');