diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a833a46b4b..6e38f312fa1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ ### Chore & Maintenance +- `[jest-watcher]` Standardize filenames ([#7314](https://github.com/facebook/jest/pull/7314)) - `[docs]` Add synchronous test.each setup ([#7150](https://github.com/facebook/jest/pull/7150)) - `[docs]` Add `this.extend` to the Custom Matchers API reference ([#7130](https://github.com/facebook/jest/pull/7130)) - `[docs]` Fix default value for `coverageReporters` value in configuration docs ([#7126](https://github.com/facebook/jest/pull/7126)) diff --git a/packages/jest-circus/src/format_node_assert_errors.js b/packages/jest-circus/src/format_node_assert_errors.js index 9bf6462823a0..9151fa9fe3fa 100644 --- a/packages/jest-circus/src/format_node_assert_errors.js +++ b/packages/jest-circus/src/format_node_assert_errors.js @@ -7,7 +7,7 @@ * @flow strict-local */ -import type {DiffOptions} from 'jest-diff/src/diff_strings'; +import type {DiffOptions} from 'jest-diff/src/diffStrings'; import type {Event, State} from 'types/Circus'; import {printExpected, printReceived} from 'jest-matcher-utils'; diff --git a/packages/jest-diff/src/diff_strings.js b/packages/jest-diff/src/diffStrings.js similarity index 100% rename from packages/jest-diff/src/diff_strings.js rename to packages/jest-diff/src/diffStrings.js diff --git a/packages/jest-diff/src/index.js b/packages/jest-diff/src/index.js index ecee23658b66..340650b779c9 100644 --- a/packages/jest-diff/src/index.js +++ b/packages/jest-diff/src/index.js @@ -7,12 +7,12 @@ * @flow */ -import type {DiffOptions} from './diff_strings'; +import type {DiffOptions} from './diffStrings'; import prettyFormat from 'pretty-format'; import chalk from 'chalk'; import getType from 'jest-get-type'; -import diffStrings from './diff_strings'; +import diffStrings from './diffStrings'; import {NO_DIFF_MESSAGE, SIMILAR_MESSAGE} from './constants'; const { diff --git a/packages/jest-jasmine2/src/assert_support.js b/packages/jest-jasmine2/src/assert_support.js index 74414a0051f8..dd991bb7603c 100644 --- a/packages/jest-jasmine2/src/assert_support.js +++ b/packages/jest-jasmine2/src/assert_support.js @@ -7,7 +7,7 @@ * @flow */ -import type {DiffOptions} from 'jest-diff/src/diff_strings'; +import type {DiffOptions} from 'jest-diff/src/diffStrings'; import {printReceived, printExpected} from 'jest-matcher-utils'; import chalk from 'chalk'; diff --git a/packages/jest-watcher/src/base_watch_plugin.js b/packages/jest-watcher/src/BaseWatchPlugin.js similarity index 100% rename from packages/jest-watcher/src/base_watch_plugin.js rename to packages/jest-watcher/src/BaseWatchPlugin.js diff --git a/packages/jest-watcher/src/jest_hooks.js b/packages/jest-watcher/src/JestHooks.js similarity index 100% rename from packages/jest-watcher/src/jest_hooks.js rename to packages/jest-watcher/src/JestHooks.js diff --git a/packages/jest-watcher/src/pattern_prompt.js b/packages/jest-watcher/src/PatternPrompt.js similarity index 100% rename from packages/jest-watcher/src/pattern_prompt.js rename to packages/jest-watcher/src/PatternPrompt.js diff --git a/packages/jest-watcher/src/index.js b/packages/jest-watcher/src/index.js index fbe13be62b2c..ec145efba3bd 100644 --- a/packages/jest-watcher/src/index.js +++ b/packages/jest-watcher/src/index.js @@ -7,9 +7,9 @@ * @flow */ -export {default as BaseWatchPlugin} from './base_watch_plugin'; -export {default as JestHook} from './jest_hooks'; -export {default as PatternPrompt} from './pattern_prompt'; +export {default as BaseWatchPlugin} from './BaseWatchPlugin'; +export {default as JestHook} from './JestHooks'; +export {default as PatternPrompt} from './PatternPrompt'; export * from './constants'; export {default as Prompt} from './lib/Prompt'; -export * from './lib/pattern_mode_helpers'; +export * from './lib/patternModeHelpers'; diff --git a/packages/jest-watcher/src/lib/__tests__/format_test_name_by_pattern.test.js b/packages/jest-watcher/src/lib/__tests__/format_test_name_by_pattern.test.js index 08b688f77aae..16bea7d02681 100644 --- a/packages/jest-watcher/src/lib/__tests__/format_test_name_by_pattern.test.js +++ b/packages/jest-watcher/src/lib/__tests__/format_test_name_by_pattern.test.js @@ -9,7 +9,7 @@ 'use strict'; -import formatTestNameByPattern from '../format_test_name_by_pattern'; +import formatTestNameByPattern from '../formatTestNameByPattern'; describe('for multiline test name returns', () => { const testNames = [ diff --git a/packages/jest-watcher/src/lib/__tests__/scroll_list.test.js b/packages/jest-watcher/src/lib/__tests__/scroll_list.test.js index a29c327c52e1..39680db8094c 100644 --- a/packages/jest-watcher/src/lib/__tests__/scroll_list.test.js +++ b/packages/jest-watcher/src/lib/__tests__/scroll_list.test.js @@ -1,4 +1,4 @@ -import scroll from '../scroll_list'; +import scroll from '../scrollList'; it('When offset is -1', () => { expect(scroll(25, {max: 10, offset: -1})).toEqual({ diff --git a/packages/jest-watcher/src/lib/format_test_name_by_pattern.js b/packages/jest-watcher/src/lib/formatTestNameByPattern.js similarity index 100% rename from packages/jest-watcher/src/lib/format_test_name_by_pattern.js rename to packages/jest-watcher/src/lib/formatTestNameByPattern.js diff --git a/packages/jest-watcher/src/lib/pattern_mode_helpers.js b/packages/jest-watcher/src/lib/patternModeHelpers.js similarity index 100% rename from packages/jest-watcher/src/lib/pattern_mode_helpers.js rename to packages/jest-watcher/src/lib/patternModeHelpers.js diff --git a/packages/jest-watcher/src/lib/scroll_list.js b/packages/jest-watcher/src/lib/scrollList.js similarity index 88% rename from packages/jest-watcher/src/lib/scroll_list.js rename to packages/jest-watcher/src/lib/scrollList.js index 913456206139..eb9d0030297d 100644 --- a/packages/jest-watcher/src/lib/scroll_list.js +++ b/packages/jest-watcher/src/lib/scrollList.js @@ -11,7 +11,7 @@ import type {ScrollOptions} from 'types/Watch'; -export default function scroll(size: number, {offset, max}: ScrollOptions) { +export default function scrollList(size: number, {offset, max}: ScrollOptions) { let start = 0; let index = Math.min(offset, size);