diff --git a/examples/async/__tests__/user-test.js b/examples/async/__tests__/user.test.js similarity index 100% rename from examples/async/__tests__/user-test.js rename to examples/async/__tests__/user.test.js diff --git a/examples/enzyme/__tests__/CheckboxWithLabel-test.js b/examples/enzyme/__tests__/checkbox_with_label.test.js similarity index 100% rename from examples/enzyme/__tests__/CheckboxWithLabel-test.js rename to examples/enzyme/__tests__/checkbox_with_label.test.js diff --git a/examples/jquery/__tests__/displayUser-test.js b/examples/jquery/__tests__/display_user.test.js similarity index 100% rename from examples/jquery/__tests__/displayUser-test.js rename to examples/jquery/__tests__/display_user.test.js diff --git a/examples/jquery/__tests__/fetchCurrentUser-test.js b/examples/jquery/__tests__/fetch_current_user.test.js similarity index 100% rename from examples/jquery/__tests__/fetchCurrentUser-test.js rename to examples/jquery/__tests__/fetch_current_user.test.js diff --git a/examples/manual_mocks/__tests__/FileSummarizer-test.js b/examples/manual_mocks/__tests__/file_summarizer.test.js similarity index 100% rename from examples/manual_mocks/__tests__/FileSummarizer-test.js rename to examples/manual_mocks/__tests__/file_summarizer.test.js diff --git a/examples/react-native/__tests__/__snapshots__/Intro-test.js.snap b/examples/react-native/__tests__/__snapshots__/intro.test.js.snap similarity index 100% rename from examples/react-native/__tests__/__snapshots__/Intro-test.js.snap rename to examples/react-native/__tests__/__snapshots__/intro.test.js.snap diff --git a/examples/react-native/__tests__/Intro-test.js b/examples/react-native/__tests__/intro.test.js similarity index 100% rename from examples/react-native/__tests__/Intro-test.js rename to examples/react-native/__tests__/intro.test.js diff --git a/examples/react/__tests__/CheckboxWithLabel-test.js b/examples/react/__tests__/checkbox_with_label.test.js similarity index 100% rename from examples/react/__tests__/CheckboxWithLabel-test.js rename to examples/react/__tests__/checkbox_with_label.test.js diff --git a/examples/snapshot/__tests__/__snapshots__/Clock.react-test.js.snap b/examples/snapshot/__tests__/__snapshots__/clock.react.test.js.snap similarity index 100% rename from examples/snapshot/__tests__/__snapshots__/Clock.react-test.js.snap rename to examples/snapshot/__tests__/__snapshots__/clock.react.test.js.snap diff --git a/examples/snapshot/__tests__/__snapshots__/Link.react-test.js.snap b/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap similarity index 100% rename from examples/snapshot/__tests__/__snapshots__/Link.react-test.js.snap rename to examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap diff --git a/examples/snapshot/__tests__/Clock.react-test.js b/examples/snapshot/__tests__/clock.react.test.js similarity index 100% rename from examples/snapshot/__tests__/Clock.react-test.js rename to examples/snapshot/__tests__/clock.react.test.js diff --git a/examples/snapshot/__tests__/Link.react-test.js b/examples/snapshot/__tests__/link.react.test.js similarity index 100% rename from examples/snapshot/__tests__/Link.react-test.js rename to examples/snapshot/__tests__/link.react.test.js diff --git a/examples/timer/__tests__/infiniteTimerGame-test.js b/examples/timer/__tests__/infinite_timer_game.test.js similarity index 100% rename from examples/timer/__tests__/infiniteTimerGame-test.js rename to examples/timer/__tests__/infinite_timer_game.test.js diff --git a/examples/timer/__tests__/timerGame-test.js b/examples/timer/__tests__/timer_game.test.js similarity index 100% rename from examples/timer/__tests__/timerGame-test.js rename to examples/timer/__tests__/timer_game.test.js diff --git a/examples/typescript/__tests__/CheckboxWithLabel-test.tsx b/examples/typescript/__tests__/checkbox_with_label.test.tsx similarity index 100% rename from examples/typescript/__tests__/CheckboxWithLabel-test.tsx rename to examples/typescript/__tests__/checkbox_with_label.test.tsx diff --git a/examples/typescript/__tests__/sum-test.js b/examples/typescript/__tests__/sum.test.js similarity index 100% rename from examples/typescript/__tests__/sum-test.js rename to examples/typescript/__tests__/sum.test.js diff --git a/integration_tests/__tests__/__snapshots__/console-test.js.snap b/integration_tests/__tests__/__snapshots__/console.test.js.snap similarity index 71% rename from integration_tests/__tests__/__snapshots__/console-test.js.snap rename to integration_tests/__tests__/__snapshots__/console.test.js.snap index a327e3efea5b..7215dd4217bb 100644 --- a/integration_tests/__tests__/__snapshots__/console-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/console.test.js.snap @@ -1,16 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`console printing 1`] = ` -" PASS __tests__/console-test.js +" PASS __tests__/console.test.js ● Console - console.log __tests__/console-test.js:11 + console.log __tests__/console.test.js:11 This is a log message. - console.info __tests__/console-test.js:13 + console.info __tests__/console.test.js:13 This is an info message. - console.warn __tests__/console-test.js:15 + console.warn __tests__/console.test.js:15 This is a warning message. - console.error __tests__/console-test.js:17 + console.error __tests__/console.test.js:17 This is an error message. @@ -27,23 +27,23 @@ Ran all test suites. `; exports[`console printing with --verbose 1`] = ` -" console.log __tests__/console-test.js:11 +" console.log __tests__/console.test.js:11 This is a log message. - console.info __tests__/console-test.js:13 + console.info __tests__/console.test.js:13 This is an info message. - console.warn __tests__/console-test.js:15 + console.warn __tests__/console.test.js:15 This is a warning message. - console.error __tests__/console-test.js:17 + console.error __tests__/console.test.js:17 This is an error message. " `; exports[`console printing with --verbose 2`] = ` -" PASS __tests__/console-test.js +" PASS __tests__/console.test.js ✓ works just fine " @@ -61,7 +61,7 @@ Ran all test suites. exports[`does not print to console with --silent 1`] = `""`; exports[`does not print to console with --silent 2`] = ` -" PASS __tests__/console-test.js +" PASS __tests__/console.test.js " `; diff --git a/integration_tests/__tests__/__snapshots__/coverage-remapping-test.js.snap b/integration_tests/__tests__/__snapshots__/coverage_remapping.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/coverage-remapping-test.js.snap rename to integration_tests/__tests__/__snapshots__/coverage_remapping.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/coverage_report-test.js.snap b/integration_tests/__tests__/__snapshots__/coverage_report.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/coverage_report-test.js.snap rename to integration_tests/__tests__/__snapshots__/coverage_report.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/coverage-threshold-test.js.snap b/integration_tests/__tests__/__snapshots__/coverage_threshold.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/coverage-threshold-test.js.snap rename to integration_tests/__tests__/__snapshots__/coverage_threshold.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap b/integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap similarity index 84% rename from integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap rename to integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap index f6b9d7c37f93..eba40a73f12c 100644 --- a/integration_tests/__tests__/__snapshots__/custom-reporters-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap @@ -34,14 +34,14 @@ Object { "hello": "world", "maxWorkers": "<>", "pattern": Object { - "input": "add-fail-test.js", + "input": "add_fail.test.js", "paths": Array [ - "add-fail-test.js", + "add_fail.test.js", ], "shouldTreatInputAsPattern": false, - "testPathPattern": "add-fail-test.js", + "testPathPattern": "add_fail.test.js", }, - "testPathPattern": "\\"add-fail-test.js\\"", + "testPathPattern": "\\"add_fail.test.js\\"", }, } `; @@ -72,20 +72,20 @@ Object { "hello": "world", "maxWorkers": "<>", "pattern": Object { - "input": "add-test.js", + "input": "add.test.js", "paths": Array [ - "add-test.js", + "add.test.js", ], "shouldTreatInputAsPattern": false, - "testPathPattern": "add-test.js", + "testPathPattern": "add.test.js", }, - "testPathPattern": "\\"add-test.js\\"", + "testPathPattern": "\\"add.test.js\\"", }, } `; exports[`Custom Reporters Integration default reporters enabled 1`] = ` -" PASS __tests__/add-test.js +" PASS __tests__/add.test.js Custom Reporters ✓ adds ok @@ -97,7 +97,7 @@ exports[`Custom Reporters Integration default reporters enabled 2`] = ` Tests: 1 passed, 1 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"add-test.js\\". +Ran all test suites matching \\"add.test.js\\". " `; @@ -124,14 +124,14 @@ Object { "options": Object { "maxWorkers": "<>", "pattern": Object { - "input": "add-test.js", + "input": "add.test.js", "paths": Array [ - "add-test.js", + "add.test.js", ], "shouldTreatInputAsPattern": false, - "testPathPattern": "add-test.js", + "testPathPattern": "add.test.js", }, - "testPathPattern": "\\"add-test.js\\"", + "testPathPattern": "\\"add.test.js\\"", }, } `; diff --git a/integration_tests/__tests__/__snapshots__/failures-test.js.snap b/integration_tests/__tests__/__snapshots__/failures.test.js.snap similarity index 83% rename from integration_tests/__tests__/__snapshots__/failures-test.js.snap rename to integration_tests/__tests__/__snapshots__/failures.test.js.snap index c45d6dc788da..f3f64ce993f4 100644 --- a/integration_tests/__tests__/__snapshots__/failures-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/failures.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`not throwing Error objects 1`] = ` -" FAIL __tests__/throw-number-test.js +" FAIL __tests__/throw_number.test.js ● Test suite failed to run Expected an Error, but \\"1\\" was thrown @@ -10,7 +10,7 @@ exports[`not throwing Error objects 1`] = ` `; exports[`not throwing Error objects 2`] = ` -" FAIL __tests__/throw-string-test.js +" FAIL __tests__/throw_string.test.js ● Test suite failed to run Error @@ -20,7 +20,7 @@ exports[`not throwing Error objects 2`] = ` `; exports[`not throwing Error objects 3`] = ` -" FAIL __tests__/throw-object-test.js +" FAIL __tests__/throw_object.test.js ● Test suite failed to run Error: No message was provided @@ -29,12 +29,12 @@ exports[`not throwing Error objects 3`] = ` `; exports[`not throwing Error objects 4`] = ` -" FAIL __tests__/assertion-count-test.js +" FAIL __tests__/assertion_count.test.js ● .assertions() › throws expect(received).toBeTruthy() Expected value to be truthy, instead received false - at __tests__/assertion-count-test.js:14:17 + at __tests__/assertion_count.test.js:14:17 ● .assertions() › throws expect.assertions(2) Expected two assertions to be called but only received one assertion call. @@ -42,7 +42,7 @@ exports[`not throwing Error objects 4`] = ` expect(received).toBeTruthy() Expected value to be truthy, instead received false - at __tests__/assertion-count-test.js:18:17 + at __tests__/assertion_count.test.js:18:17 ● .assertions() › throws on assertion expect.assertions(0) Expected zero assertions to be called but only received one assertion call. @@ -59,7 +59,7 @@ exports[`not throwing Error objects 4`] = ` `; exports[`works with node assert 1`] = ` -" FAIL __tests__/node-assertion-error-test.js +" FAIL __tests__/node_assertion_error.test.js ● assert assert.equal(received, expected) or assert(received) @@ -69,7 +69,7 @@ exports[`works with node assert 1`] = ` Received: false - at __tests__/node-assertion-error-test.js:16:3 + at __tests__/node_assertion_error.test.js:16:3 ● assert with a message @@ -83,7 +83,7 @@ exports[`works with node assert 1`] = ` Message: this is a message - at __tests__/node-assertion-error-test.js:20:3 + at __tests__/node_assertion_error.test.js:20:3 ● assert.ok @@ -94,7 +94,7 @@ exports[`works with node assert 1`] = ` Received: false - at __tests__/node-assertion-error-test.js:24:10 + at __tests__/node_assertion_error.test.js:24:10 ● assert.ok with a message @@ -108,7 +108,7 @@ exports[`works with node assert 1`] = ` Message: this is a message - at __tests__/node-assertion-error-test.js:28:10 + at __tests__/node_assertion_error.test.js:28:10 ● assert.equal @@ -119,7 +119,7 @@ exports[`works with node assert 1`] = ` Received: 1 - at __tests__/node-assertion-error-test.js:32:10 + at __tests__/node_assertion_error.test.js:32:10 ● assert.notEqual @@ -134,7 +134,7 @@ exports[`works with node assert 1`] = ` Compared values have no visual difference. - at __tests__/node-assertion-error-test.js:36:10 + at __tests__/node_assertion_error.test.js:36:10 ● assert.deepEqual @@ -159,7 +159,7 @@ exports[`works with node assert 1`] = ` }, } - at __tests__/node-assertion-error-test.js:40:10 + at __tests__/node_assertion_error.test.js:40:10 ● assert.deepEqual with a message @@ -187,7 +187,7 @@ exports[`works with node assert 1`] = ` }, } - at __tests__/node-assertion-error-test.js:44:10 + at __tests__/node_assertion_error.test.js:44:10 ● assert.notDeepEqual @@ -202,7 +202,7 @@ exports[`works with node assert 1`] = ` Compared values have no visual difference. - at __tests__/node-assertion-error-test.js:48:10 + at __tests__/node_assertion_error.test.js:48:10 ● assert.strictEqual @@ -213,7 +213,7 @@ exports[`works with node assert 1`] = ` Received: 1 - at __tests__/node-assertion-error-test.js:52:10 + at __tests__/node_assertion_error.test.js:52:10 ● assert.notStrictEqual @@ -231,7 +231,7 @@ exports[`works with node assert 1`] = ` Compared values have no visual difference. - at __tests__/node-assertion-error-test.js:56:10 + at __tests__/node_assertion_error.test.js:56:10 ● assert.deepStrictEqual @@ -252,7 +252,7 @@ exports[`works with node assert 1`] = ` + \\"a\\": 1, } - at __tests__/node-assertion-error-test.js:60:10 + at __tests__/node_assertion_error.test.js:60:10 ● assert.notDeepStrictEqual @@ -267,7 +267,7 @@ exports[`works with node assert 1`] = ` Compared values have no visual difference. - at __tests__/node-assertion-error-test.js:64:10 + at __tests__/node_assertion_error.test.js:64:10 ● assert.ifError @@ -285,7 +285,7 @@ exports[`works with node assert 1`] = ` Message: Got unwanted exception. - at __tests__/node-assertion-error-test.js:72:10 + at __tests__/node_assertion_error.test.js:72:10 ● assert.throws @@ -297,7 +297,7 @@ exports[`works with node assert 1`] = ` Message: Missing expected exception. - at __tests__/node-assertion-error-test.js:78:10 + at __tests__/node_assertion_error.test.js:78:10 ✕ assert ✕ assert with a message diff --git a/integration_tests/__tests__/__snapshots__/globals-test.js.snap b/integration_tests/__tests__/__snapshots__/globals.test.js.snap similarity index 88% rename from integration_tests/__tests__/__snapshots__/globals-test.js.snap rename to integration_tests/__tests__/__snapshots__/globals.test.js.snap index c6fd3195c305..b40dfdc8f509 100644 --- a/integration_tests/__tests__/__snapshots__/globals-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/globals.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`basic test constructs 1`] = ` -" PASS __tests__/basic-test-constructs-test.js +" PASS __tests__/basic.test-constructs.test.js ✓ it ✓ test describe @@ -21,7 +21,7 @@ Ran all test suites. `; exports[`only 1`] = ` -" PASS __tests__/only-constructs-test.js +" PASS __tests__/only-constructs.test.js ✓ test.only ✓ it.only ✓ fit @@ -47,7 +47,7 @@ Ran all test suites. `; exports[`only with expand arg 1`] = ` -" PASS __tests__/only-constructs-test.js +" PASS __tests__/only-constructs.test.js ○ it ✓ test.only ✓ it.only @@ -73,7 +73,7 @@ Ran all test suites. `; exports[`skips 1`] = ` -" PASS __tests__/skips-constructs-test.js +" PASS __tests__/skips-constructs.test.js ✓ it ○ skipped 4 tests xdescribe @@ -96,7 +96,7 @@ Ran all test suites. `; exports[`skips with expand arg 1`] = ` -" PASS __tests__/skips-constructs-test.js +" PASS __tests__/skips-constructs.test.js ✓ it ○ xtest ○ xit @@ -123,7 +123,7 @@ Ran all test suites. `; exports[`tests with no implementation 1`] = ` -" PASS __tests__/only-constructs-test.js +" PASS __tests__/only-constructs.test.js ✓ it ○ skipped 2 tests @@ -140,7 +140,7 @@ Ran all test suites. `; exports[`tests with no implementation with expand arg 1`] = ` -" PASS __tests__/only-constructs-test.js +" PASS __tests__/only-constructs.test.js ✓ it ○ it, no implementation ○ test, no implementation diff --git a/integration_tests/__tests__/__snapshots__/jest.config.js-test.js.snap b/integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/jest.config.js-test.js.snap rename to integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/showConfig-test.js.snap b/integration_tests/__tests__/__snapshots__/show_config.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/showConfig-test.js.snap rename to integration_tests/__tests__/__snapshots__/show_config.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/snapshot-test.js.snap b/integration_tests/__tests__/__snapshots__/snapshot.test.js.snap similarity index 90% rename from integration_tests/__tests__/__snapshots__/snapshot-test.js.snap rename to integration_tests/__tests__/__snapshots__/snapshot.test.js.snap index 90db2bdc908c..19d85d8f6d8c 100644 --- a/integration_tests/__tests__/__snapshots__/snapshot-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/snapshot.test.js.snap @@ -95,7 +95,7 @@ exports[`Snapshot works with escaped characters 1`] = ` Tests: 1 passed, 1 total Snapshots: 1 added, 1 total Time: <> -Ran all test suites matching \\"snapshot-test.js\\". +Ran all test suites matching \\"snapshot.test.js\\". " `; @@ -104,7 +104,7 @@ exports[`Snapshot works with escaped characters 2`] = ` Tests: 2 passed, 2 total Snapshots: 1 added, 1 passed, 2 total Time: <> -Ran all test suites matching \\"snapshot-test.js\\". +Ran all test suites matching \\"snapshot.test.js\\". " `; @@ -113,7 +113,7 @@ exports[`Snapshot works with escaped characters 3`] = ` Tests: 2 passed, 2 total Snapshots: 2 passed, 2 total Time: <> -Ran all test suites matching \\"snapshot-test.js\\". +Ran all test suites matching \\"snapshot.test.js\\". " `; @@ -122,7 +122,7 @@ exports[`Snapshot works with escaped regex 1`] = ` Tests: 2 passed, 2 total Snapshots: 2 added, 2 total Time: <> -Ran all test suites matching \\"snapshot-escape-regex.js\\". +Ran all test suites matching \\"snapshot_escape_regex.js\\". " `; @@ -131,7 +131,7 @@ exports[`Snapshot works with escaped regex 2`] = ` Tests: 2 passed, 2 total Snapshots: 2 passed, 2 total Time: <> -Ran all test suites matching \\"snapshot-escape-regex.js\\". +Ran all test suites matching \\"snapshot_escape_regex.js\\". " `; @@ -140,7 +140,7 @@ exports[`Snapshot works with template literal subsitutions 1`] = ` Tests: 1 passed, 1 total Snapshots: 1 added, 1 total Time: <> -Ran all test suites matching \\"snapshot-escape-substitution-test.js\\". +Ran all test suites matching \\"snapshot_escape_substitution.test.js\\". " `; @@ -149,6 +149,6 @@ exports[`Snapshot works with template literal subsitutions 2`] = ` Tests: 1 passed, 1 total Snapshots: 1 passed, 1 total Time: <> -Ran all test suites matching \\"snapshot-escape-substitution-test.js\\". +Ran all test suites matching \\"snapshot_escape_substitution.test.js\\". " `; diff --git a/integration_tests/__tests__/__snapshots__/snapshot-serializers-test.js.snap b/integration_tests/__tests__/__snapshots__/snapshot_serializers.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/snapshot-serializers-test.js.snap rename to integration_tests/__tests__/__snapshots__/snapshot_serializers.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/stack_trace-test.js.snap b/integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap similarity index 78% rename from integration_tests/__tests__/__snapshots__/stack_trace-test.js.snap rename to integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap index da982fbd5eb9..3477c6847149 100644 --- a/integration_tests/__tests__/__snapshots__/stack_trace-test.js.snap +++ b/integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap @@ -5,7 +5,7 @@ exports[`Stack Trace does not print a stack trace for errors when --noStackTrace Tests: 3 failed, 3 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"test-error-test.js\\". +Ran all test suites matching \\"test_error.test.js\\". " `; @@ -14,7 +14,7 @@ exports[`Stack Trace does not print a stack trace for matching errors when --noS Tests: 1 failed, 1 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"stack-trace-test.js\\". +Ran all test suites matching \\"stack_trace.test.js\\". " `; @@ -23,7 +23,7 @@ exports[`Stack Trace does not print a stack trace for runtime errors when --noSt Tests: 0 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"runtime-error-test.js\\". +Ran all test suites matching \\"runtime_error.test.js\\". " `; @@ -32,7 +32,7 @@ exports[`Stack Trace prints a stack trace for errors 1`] = ` Tests: 3 failed, 3 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"test-error-test.js\\". +Ran all test suites matching \\"test_error.test.js\\". " `; @@ -41,7 +41,7 @@ exports[`Stack Trace prints a stack trace for errors without message in stack tr Tests: 1 failed, 1 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"stack-trace-without-message-test.js\\". +Ran all test suites matching \\"stack_trace_without_message.test.js\\". " `; @@ -50,7 +50,7 @@ exports[`Stack Trace prints a stack trace for matching errors 1`] = ` Tests: 1 failed, 1 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"stack-trace-test.js\\". +Ran all test suites matching \\"stack_trace.test.js\\". " `; @@ -59,6 +59,6 @@ exports[`Stack Trace prints a stack trace for runtime errors 1`] = ` Tests: 0 total Snapshots: 0 total Time: <> -Ran all test suites matching \\"runtime-error-test.js\\". +Ran all test suites matching \\"runtime_error.test.js\\". " `; diff --git a/integration_tests/__tests__/__snapshots__/testNamePattern-test.js.snap b/integration_tests/__tests__/__snapshots__/test_name_pattern.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/testNamePattern-test.js.snap rename to integration_tests/__tests__/__snapshots__/test_name_pattern.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/timeouts-test.js.snap b/integration_tests/__tests__/__snapshots__/timeouts.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/timeouts-test.js.snap rename to integration_tests/__tests__/__snapshots__/timeouts.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/transform-test.js.snap b/integration_tests/__tests__/__snapshots__/transform.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/transform-test.js.snap rename to integration_tests/__tests__/__snapshots__/transform.test.js.snap diff --git a/integration_tests/__tests__/__snapshots__/typescript-coverage-test.js.snap b/integration_tests/__tests__/__snapshots__/typescript_coverage.test.js.snap similarity index 100% rename from integration_tests/__tests__/__snapshots__/typescript-coverage-test.js.snap rename to integration_tests/__tests__/__snapshots__/typescript_coverage.test.js.snap diff --git a/integration_tests/__tests__/auto-clear-mocks-test.js b/integration_tests/__tests__/auto_clear_mocks.test.js similarity index 100% rename from integration_tests/__tests__/auto-clear-mocks-test.js rename to integration_tests/__tests__/auto_clear_mocks.test.js diff --git a/integration_tests/__tests__/auto-reset-mocks-test.js b/integration_tests/__tests__/auto_reset_mocks.test.js similarity index 100% rename from integration_tests/__tests__/auto-reset-mocks-test.js rename to integration_tests/__tests__/auto_reset_mocks.test.js diff --git a/integration_tests/__tests__/babel-plugin-jest-hoist-test.js b/integration_tests/__tests__/babel_plugin_jest_hoist.test.js similarity index 100% rename from integration_tests/__tests__/babel-plugin-jest-hoist-test.js rename to integration_tests/__tests__/babel_plugin_jest_hoist.test.js diff --git a/integration_tests/__tests__/compare-dom-nodes-test.js b/integration_tests/__tests__/compare_dom_nodes.test.js similarity index 100% rename from integration_tests/__tests__/compare-dom-nodes-test.js rename to integration_tests/__tests__/compare_dom_nodes.test.js diff --git a/integration_tests/__tests__/config-test.js b/integration_tests/__tests__/config.test.js similarity index 100% rename from integration_tests/__tests__/config-test.js rename to integration_tests/__tests__/config.test.js diff --git a/integration_tests/__tests__/console-test.js b/integration_tests/__tests__/console.test.js similarity index 100% rename from integration_tests/__tests__/console-test.js rename to integration_tests/__tests__/console.test.js diff --git a/integration_tests/__tests__/coverage-remapping-test.js b/integration_tests/__tests__/coverage_remapping.test.js similarity index 100% rename from integration_tests/__tests__/coverage-remapping-test.js rename to integration_tests/__tests__/coverage_remapping.test.js diff --git a/integration_tests/__tests__/coverage_report-test.js b/integration_tests/__tests__/coverage_report.test.js similarity index 99% rename from integration_tests/__tests__/coverage_report-test.js rename to integration_tests/__tests__/coverage_report.test.js index 3ae2a89be840..21a406a20156 100644 --- a/integration_tests/__tests__/coverage_report-test.js +++ b/integration_tests/__tests__/coverage_report.test.js @@ -57,7 +57,7 @@ test('collects coverage only from specified files avoiding dependencies', () => '--collectCoverageOnlyFrom', 'sum.js', '--', - 'sum-test.js', + 'sum.test.js', ]); // Coverage report should only have `sum.js` coverage info diff --git a/integration_tests/__tests__/coverage-threshold-test.js b/integration_tests/__tests__/coverage_threshold.test.js similarity index 100% rename from integration_tests/__tests__/coverage-threshold-test.js rename to integration_tests/__tests__/coverage_threshold.test.js diff --git a/integration_tests/__tests__/custom-reporters-test.js b/integration_tests/__tests__/custom_reporters.test.js similarity index 85% rename from integration_tests/__tests__/custom-reporters-test.js rename to integration_tests/__tests__/custom_reporters.test.js index 2e57e3301161..6b41da7107b8 100644 --- a/integration_tests/__tests__/custom-reporters-test.js +++ b/integration_tests/__tests__/custom_reporters.test.js @@ -16,13 +16,13 @@ describe('Custom Reporters Integration', () => { test('valid string format for adding reporters', () => { const reporterConfig = { - reporters: ['/reporters/TestReporter.js'], + reporters: ['/reporters/test_reporter.js'], }; const {status} = runJest('custom_reporters', [ '--config', JSON.stringify(reporterConfig), - 'add-test.js', + 'add.test.js', ]); expect(status).toBe(0); @@ -31,14 +31,17 @@ describe('Custom Reporters Integration', () => { test('valid array format for adding reporters', () => { const reporterConfig = { reporters: [ - ['/reporters/TestReporter.js', {'Dmitrii Abramov': 'Awesome'}], + [ + '/reporters/test_reporter.js', + {'Dmitrii Abramov': 'Awesome'}, + ], ], }; const {status} = runJest('custom_reporters', [ '--config', JSON.stringify(reporterConfig), - 'add-test.js', + 'add.test.js', ]); expect(status).toBe(0); @@ -52,7 +55,7 @@ describe('Custom Reporters Integration', () => { const {status, stderr} = runJest('custom_reporters', [ '--config', JSON.stringify(reporterConfig), - 'add-test.js', + 'add.test.js', ]); expect(status).toBe(1); @@ -63,9 +66,9 @@ describe('Custom Reporters Integration', () => { const {stderr, stdout, status} = runJest('custom_reporters', [ '--config', JSON.stringify({ - reporters: ['default', '/reporters/TestReporter.js'], + reporters: ['default', '/reporters/test_reporter.js'], }), - 'add-test.js', + 'add.test.js', ]); const {summary, rest} = extractSummary(stderr); @@ -79,7 +82,7 @@ describe('Custom Reporters Integration', () => { test('TestReporter with all tests passing', () => { const {stdout, status, stderr} = runJest('custom_reporters', [ - 'add-test.js', + 'add.test.js', ]); const parsedJSON = JSON.parse(stdout); @@ -91,7 +94,7 @@ describe('Custom Reporters Integration', () => { test('TestReporter with all tests failing', () => { const {stdout, status, stderr} = runJest('custom_reporters', [ - 'add-fail-test.js', + 'add_fail.test.js', ]); const parsedJSON = JSON.parse(stdout); @@ -106,9 +109,9 @@ describe('Custom Reporters Integration', () => { '--no-cache', '--config', JSON.stringify({ - reporters: ['/reporters/IncompleteReporter.js'], + reporters: ['/reporters/incomplete_reporter.js'], }), - 'add-test.js', + 'add.test.js', ]); expect(status).toBe(0); diff --git a/integration_tests/__tests__/debug-test.js b/integration_tests/__tests__/debug.test.js similarity index 100% rename from integration_tests/__tests__/debug-test.js rename to integration_tests/__tests__/debug.test.js diff --git a/integration_tests/__tests__/empty_suite_error-test.js b/integration_tests/__tests__/empty_suite_error.test.js similarity index 100% rename from integration_tests/__tests__/empty_suite_error-test.js rename to integration_tests/__tests__/empty_suite_error.test.js diff --git a/integration_tests/__tests__/env-test.js b/integration_tests/__tests__/env.test.js similarity index 100% rename from integration_tests/__tests__/env-test.js rename to integration_tests/__tests__/env.test.js diff --git a/integration_tests/__tests__/failures-test.js b/integration_tests/__tests__/failures.test.js similarity index 84% rename from integration_tests/__tests__/failures-test.js rename to integration_tests/__tests__/failures.test.js index 46049519b11b..d878126be122 100644 --- a/integration_tests/__tests__/failures-test.js +++ b/integration_tests/__tests__/failures.test.js @@ -43,17 +43,17 @@ const cleanupStackTrace = stderr => { test('not throwing Error objects', () => { let stderr; - stderr = runJest(dir, ['throw-number-test.js']).stderr; + stderr = runJest(dir, ['throw_number.test.js']).stderr; expect(extractSummary(stderr).rest).toMatchSnapshot(); - stderr = runJest(dir, ['throw-string-test.js']).stderr; + stderr = runJest(dir, ['throw_string.test.js']).stderr; expect(extractSummary(stderr).rest).toMatchSnapshot(); - stderr = runJest(dir, ['throw-object-test.js']).stderr; + stderr = runJest(dir, ['throw_object.test.js']).stderr; expect(extractSummary(stderr).rest).toMatchSnapshot(); - stderr = runJest(dir, ['assertion-count-test.js']).stderr; + stderr = runJest(dir, ['assertion_count.test.js']).stderr; expect(extractSummary(cleanupStackTrace(stderr)).rest).toMatchSnapshot(); }); test('works with node assert', () => { - const {stderr} = runJest(dir, ['node-assertion-error-test.js']); + const {stderr} = runJest(dir, ['node_assertion_error.test.js']); expect(normalizeDots(extractSummary(stderr).rest)).toMatchSnapshot(); }); diff --git a/integration_tests/__tests__/global-test.js b/integration_tests/__tests__/global.test.js similarity index 100% rename from integration_tests/__tests__/global-test.js rename to integration_tests/__tests__/global.test.js diff --git a/integration_tests/__tests__/globals-test.js b/integration_tests/__tests__/globals.test.js similarity index 92% rename from integration_tests/__tests__/globals-test.js rename to integration_tests/__tests__/globals.test.js index 8471d4b8dd16..4735fe673b6d 100644 --- a/integration_tests/__tests__/globals-test.js +++ b/integration_tests/__tests__/globals.test.js @@ -15,7 +15,7 @@ const runJest = require('../runJest'); const {extractSummary} = require('../utils'); const {createEmptyPackage, writeFiles, cleanup} = require('../utils'); -const DIR = path.resolve(os.tmpdir(), 'global-variables-test'); +const DIR = path.resolve(os.tmpdir(), 'global-variables.test'); const TEST_DIR = path.resolve(DIR, '__tests__'); skipOnWindows.suite(); @@ -28,7 +28,7 @@ beforeEach(() => { afterAll(() => cleanup(DIR)); test('basic test constructs', () => { - const filename = 'basic-test-constructs-test.js'; + const filename = 'basic.test-constructs.test.js'; const content = ` it('it', () => {}); test('test', () => {}); @@ -49,7 +49,7 @@ test('basic test constructs', () => { }); test('skips', () => { - const filename = 'skips-constructs-test.js'; + const filename = 'skips-constructs.test.js'; const content = ` it('it', () => {}); xtest('xtest', () => {}); @@ -80,7 +80,7 @@ test('skips', () => { }); test('only', () => { - const filename = 'only-constructs-test.js'; + const filename = 'only-constructs.test.js'; const content = ` it('it', () => {}); test.only('test.only', () => {}); @@ -110,7 +110,7 @@ test('only', () => { }); test('tests with no implementation', () => { - const filename = 'only-constructs-test.js'; + const filename = 'only-constructs.test.js'; const content = ` it('it', () => {}); it('it, no implementation'); @@ -127,7 +127,7 @@ test('tests with no implementation', () => { }); test('skips with expand arg', () => { - const filename = 'skips-constructs-test.js'; + const filename = 'skips-constructs.test.js'; const content = ` it('it', () => {}); xtest('xtest', () => {}); @@ -158,7 +158,7 @@ test('skips with expand arg', () => { }); test('only with expand arg', () => { - const filename = 'only-constructs-test.js'; + const filename = 'only-constructs.test.js'; const content = ` it('it', () => {}); test.only('test.only', () => {}); @@ -188,7 +188,7 @@ test('only with expand arg', () => { }); test('tests with no implementation with expand arg', () => { - const filename = 'only-constructs-test.js'; + const filename = 'only-constructs.test.js'; const content = ` it('it', () => {}); it('it, no implementation'); diff --git a/integration_tests/__tests__/jasmine_async-test.js b/integration_tests/__tests__/jasmine_async.test.js similarity index 87% rename from integration_tests/__tests__/jasmine_async-test.js rename to integration_tests/__tests__/jasmine_async.test.js index aed80cbb68f2..69654fea1cf3 100644 --- a/integration_tests/__tests__/jasmine_async-test.js +++ b/integration_tests/__tests__/jasmine_async.test.js @@ -12,7 +12,9 @@ const runJest = require('../runJest'); describe('async jasmine', () => { it('works with beforeAll', () => { - const result = runJest.json('jasmine_async', ['promise_beforeAll-test.js']); + const result = runJest.json('jasmine_async', [ + 'promise_before_all.test.js', + ]); const json = result.json; expect(json.numTotalTests).toBe(2); @@ -27,7 +29,7 @@ describe('async jasmine', () => { it('works with beforeEach', () => { const result = runJest.json('jasmine_async', [ - 'promise_beforeEach-test.js', + 'promise_before_each.test.js', ]); const json = result.json; @@ -39,7 +41,7 @@ describe('async jasmine', () => { }); it('works with afterAll', () => { - const result = runJest.json('jasmine_async', ['promise_afterAll-test.js']); + const result = runJest.json('jasmine_async', ['promise_after_all.test.js']); const json = result.json; expect(json.numTotalTests).toBe(2); @@ -52,7 +54,9 @@ describe('async jasmine', () => { }); it('works with afterEach', () => { - const result = runJest.json('jasmine_async', ['promise_afterEach-test.js']); + const result = runJest.json('jasmine_async', [ + 'promise_after_each.test.js', + ]); const json = result.json; expect(json.numTotalTests).toBe(2); @@ -63,7 +67,7 @@ describe('async jasmine', () => { }); it('works with fit', () => { - const result = runJest.json('jasmine_async', ['promise_fit-test.js']); + const result = runJest.json('jasmine_async', ['promise_fit.test.js']); const json = result.json; expect(json.numTotalTests).toBe(3); @@ -74,7 +78,7 @@ describe('async jasmine', () => { }); it('works with xit', () => { - const result = runJest.json('jasmine_async', ['promise_xit-test.js']); + const result = runJest.json('jasmine_async', ['promise_xit.test.js']); const json = result.json; expect(json.numTotalTests).toBe(2); @@ -84,7 +88,7 @@ describe('async jasmine', () => { }); it('throws when not a promise is returned', () => { - const result = runJest.json('jasmine_async', ['returning_values-test.js']); + const result = runJest.json('jasmine_async', ['returning_values.test.js']); const json = result.json; expect(json.numTotalTests).toBe(11); @@ -94,7 +98,7 @@ describe('async jasmine', () => { }); it('tests async promise code', () => { - const result = runJest.json('jasmine_async', ['promise_it-test.js']); + const result = runJest.json('jasmine_async', ['promise_it.test.js']); const json = result.json; const message = json.testResults[0].message; @@ -109,7 +113,7 @@ describe('async jasmine', () => { }); it('works with concurrent', () => { - const result = runJest.json('jasmine_async', ['concurrent-test.js']); + const result = runJest.json('jasmine_async', ['concurrent.test.js']); const json = result.json; expect(json.numTotalTests).toBe(4); expect(json.numPassedTests).toBe(2); diff --git a/integration_tests/__tests__/jest.config.js-test.js b/integration_tests/__tests__/jest.config.js.test.js similarity index 100% rename from integration_tests/__tests__/jest.config.js-test.js rename to integration_tests/__tests__/jest.config.js.test.js diff --git a/integration_tests/__tests__/json-test.js b/integration_tests/__tests__/json.test.js similarity index 100% rename from integration_tests/__tests__/json-test.js rename to integration_tests/__tests__/json.test.js diff --git a/integration_tests/__tests__/json_reporter-test.js b/integration_tests/__tests__/json_reporter.test.js similarity index 100% rename from integration_tests/__tests__/json_reporter-test.js rename to integration_tests/__tests__/json_reporter.test.js diff --git a/integration_tests/__tests__/list_tests-test.js b/integration_tests/__tests__/list_tests.test.js similarity index 100% rename from integration_tests/__tests__/list_tests-test.js rename to integration_tests/__tests__/list_tests.test.js diff --git a/integration_tests/__tests__/native-async-mock-test.js b/integration_tests/__tests__/native_async_mock.test.js similarity index 100% rename from integration_tests/__tests__/native-async-mock-test.js rename to integration_tests/__tests__/native_async_mock.test.js diff --git a/integration_tests/__tests__/no-test-found-test.js b/integration_tests/__tests__/no_test_found.test.js similarity index 100% rename from integration_tests/__tests__/no-test-found-test.js rename to integration_tests/__tests__/no_test_found.test.js diff --git a/integration_tests/__tests__/node_path-test.js b/integration_tests/__tests__/node_path.test.js similarity index 100% rename from integration_tests/__tests__/node_path-test.js rename to integration_tests/__tests__/node_path.test.js diff --git a/integration_tests/__tests__/regex-(char-in-path-test.js b/integration_tests/__tests__/regex_(char_in_path.test.js similarity index 100% rename from integration_tests/__tests__/regex-(char-in-path-test.js rename to integration_tests/__tests__/regex_(char_in_path.test.js diff --git a/integration_tests/__tests__/require-v8-module-test.js b/integration_tests/__tests__/require_v8_module.test.js similarity index 100% rename from integration_tests/__tests__/require-v8-module-test.js rename to integration_tests/__tests__/require_v8_module.test.js diff --git a/integration_tests/__tests__/resolve-test.js b/integration_tests/__tests__/resolve.test.js similarity index 100% rename from integration_tests/__tests__/resolve-test.js rename to integration_tests/__tests__/resolve.test.js diff --git a/integration_tests/__tests__/runtime-internal-module-registry-test.js b/integration_tests/__tests__/runtime_internal_module_registry.test.js similarity index 100% rename from integration_tests/__tests__/runtime-internal-module-registry-test.js rename to integration_tests/__tests__/runtime_internal_module_registry.test.js diff --git a/integration_tests/__tests__/set-immediate-test.js b/integration_tests/__tests__/set_immediate.test.js similarity index 100% rename from integration_tests/__tests__/set-immediate-test.js rename to integration_tests/__tests__/set_immediate.test.js diff --git a/integration_tests/__tests__/setup_test_framework_script_file_cli_config-test.js b/integration_tests/__tests__/setup_test_framework_script_file_cli_config.test.js similarity index 94% rename from integration_tests/__tests__/setup_test_framework_script_file_cli_config-test.js rename to integration_tests/__tests__/setup_test_framework_script_file_cli_config.test.js index 54075f3d0a85..ce8c53924951 100644 --- a/integration_tests/__tests__/setup_test_framework_script_file_cli_config-test.js +++ b/integration_tests/__tests__/setup_test_framework_script_file_cli_config.test.js @@ -14,8 +14,8 @@ describe('--setupTestFrameworkScriptFile setup.js', () => { const result = runJest.json('setup_test_framework_script_file_cli_config', [ '--setupTestFrameworkScriptFile', './setup1.js', - 'test1-test.js', - 'test2-test.js', + 'test1.test.js', + 'test2.test.js', ]); expect(result.status).toBe(0); @@ -28,7 +28,7 @@ describe('--setupTestFrameworkScriptFile setup.js', () => { const result = runJest.json('setup_test_framework_script_file_cli_config', [ '--setupTestFrameworkScriptFile', './setup_hooks_into_runner.js', - 'runner_patch-test.js', + 'runner_patch.test.js', ]); expect(result.json.numTotalTests).toBe(1); diff --git a/integration_tests/__tests__/showConfig-test.js b/integration_tests/__tests__/show_config.test.js similarity index 100% rename from integration_tests/__tests__/showConfig-test.js rename to integration_tests/__tests__/show_config.test.js diff --git a/integration_tests/__tests__/snapshot-test.js b/integration_tests/__tests__/snapshot.test.js similarity index 94% rename from integration_tests/__tests__/snapshot-test.js rename to integration_tests/__tests__/snapshot.test.js index f25a15ac72fc..d53faf06a215 100644 --- a/integration_tests/__tests__/snapshot-test.js +++ b/integration_tests/__tests__/snapshot.test.js @@ -19,15 +19,15 @@ const snapshotDir = path.resolve( __dirname, '../snapshot/__tests__/__snapshots__', ); -const snapshotFile = path.resolve(snapshotDir, 'snapshot-test.js.snap'); +const snapshotFile = path.resolve(snapshotDir, 'snapshot.test.js.snap'); const secondSnapshotFile = path.resolve( snapshotDir, - 'second-snapshot-test.js.snap', + 'second_snapshot.test.js.snap', ); -const snapshotOfCopy = path.resolve(snapshotDir, 'snapshot-test_copy.js.snap'); +const snapshotOfCopy = path.resolve(snapshotDir, 'snapshot.test_copy.js.snap'); const originalTestPath = path.resolve( __dirname, - '../snapshot/__tests__/snapshot-test.js', + '../snapshot/__tests__/snapshot.test.js', ); const originalTestContent = fs.readFileSync(originalTestPath, 'utf8'); const copyOfTestPath = originalTestPath.replace('.js', '_copy.js'); @@ -38,7 +38,7 @@ const snapshotEscapeDir = path.resolve( ); const snapshotEscapeTestFile = path.resolve( snapshotEscapeDir, - 'snapshot-test.js', + 'snapshot.test.js', ); const snapshotEscapeSnapshotDir = path.resolve( snapshotEscapeDir, @@ -46,15 +46,15 @@ const snapshotEscapeSnapshotDir = path.resolve( ); const snapshotEscapeFile = path.resolve( snapshotEscapeSnapshotDir, - 'snapshot-test.js.snap', + 'snapshot.test.js.snap', ); const snapshotEscapeRegexFile = path.resolve( snapshotEscapeSnapshotDir, - 'snapshot-escape-regex.js.snap', + 'snapshot_escape_regex.js.snap', ); const snapshotEscapeSubstitutionFile = path.resolve( snapshotEscapeSnapshotDir, - 'snapshot-escape-substitution-test.js.snap', + 'snapshot_escape_substitution.test.js.snap', ); const initialTestData = fs.readFileSync(snapshotEscapeTestFile, 'utf8'); @@ -125,7 +125,7 @@ describe('Snapshot', () => { let result = runJest('snapshot-escape', [ '-w=1', '--ci=false', - 'snapshot-test.js', + 'snapshot.test.js', ]); let stderr = result.stderr.toString(); @@ -144,7 +144,7 @@ describe('Snapshot', () => { '-w=1', '--ci=false', '--updateSnapshot', - 'snapshot-test.js', + 'snapshot.test.js', ]); stderr = result.stderr.toString(); @@ -157,7 +157,7 @@ describe('Snapshot', () => { result = runJest('snapshot-escape', [ '-w=1', '--ci=false', - 'snapshot-test.js', + 'snapshot.test.js', ]); stderr = result.stderr.toString(); @@ -171,7 +171,7 @@ describe('Snapshot', () => { let result = runJest('snapshot-escape', [ '-w=1', '--ci=false', - 'snapshot-escape-regex.js', + 'snapshot_escape_regex.js', ]); let stderr = result.stderr.toString(); @@ -182,7 +182,7 @@ describe('Snapshot', () => { result = runJest('snapshot-escape', [ '-w=1', '--ci=false', - 'snapshot-escape-regex.js', + 'snapshot_escape_regex.js', ]); stderr = result.stderr.toString(); @@ -198,7 +198,7 @@ describe('Snapshot', () => { let result = runJest('snapshot-escape', [ '-w=1', '--ci=false', - 'snapshot-escape-substitution-test.js', + 'snapshot_escape_substitution.test.js', ]); let stderr = result.stderr.toString(); @@ -209,7 +209,7 @@ describe('Snapshot', () => { result = runJest('snapshot-escape', [ '-w=1', '--ci=false', - 'snapshot-escape-substitution-test.js', + 'snapshot_escape_substitution.test.js', ]); stderr = result.stderr.toString(); diff --git a/integration_tests/__tests__/snapshot-serializers-test.js b/integration_tests/__tests__/snapshot_serializers.test.js similarity index 95% rename from integration_tests/__tests__/snapshot-serializers-test.js rename to integration_tests/__tests__/snapshot_serializers.test.js index de6a03a2559e..42d98d55e6f0 100644 --- a/integration_tests/__tests__/snapshot-serializers-test.js +++ b/integration_tests/__tests__/snapshot_serializers.test.js @@ -14,7 +14,7 @@ const runJest = require('../runJest'); const testDir = path.resolve(__dirname, '../snapshot-serializers'); const snapshotsDir = path.resolve(testDir, '__tests__/__snapshots__'); -const snapshotPath = path.resolve(snapshotsDir, 'snapshot-test.js.snap'); +const snapshotPath = path.resolve(snapshotsDir, 'snapshot.test.js.snap'); const runAndAssert = () => { const result = runJest.json('snapshot-serializers', [ diff --git a/integration_tests/__tests__/stack_trace-test.js b/integration_tests/__tests__/stack_trace.test.js similarity index 79% rename from integration_tests/__tests__/stack_trace-test.js rename to integration_tests/__tests__/stack_trace.test.js index ad428c62a55c..f64cf6dc5e81 100644 --- a/integration_tests/__tests__/stack_trace-test.js +++ b/integration_tests/__tests__/stack_trace.test.js @@ -12,7 +12,7 @@ const {extractSummary} = require('../utils'); describe('Stack Trace', () => { it('prints a stack trace for runtime errors', () => { - const result = runJest('stack_trace', ['runtime-error-test.js']); + const result = runJest('stack_trace', ['runtime_error.test.js']); const stderr = result.stderr.toString(); expect(extractSummary(stderr).summary).toMatchSnapshot(); @@ -22,13 +22,13 @@ describe('Stack Trace', () => { /ReferenceError: thisIsARuntimeError is not defined/, ); expect(stderr).toMatch( - /\s+at\s(?:.+?)\s\(__tests__\/runtime-error-test\.js/, + /\s+at\s(?:.+?)\s\(__tests__\/runtime_error.test\.js/, ); }); it('does not print a stack trace for runtime errors when --noStackTrace is given', () => { const result = runJest('stack_trace', [ - 'runtime-error-test.js', + 'runtime_error.test.js', '--noStackTrace', ]); const stderr = result.stderr.toString(); @@ -40,23 +40,23 @@ describe('Stack Trace', () => { /ReferenceError: thisIsARuntimeError is not defined/, ); expect(stderr).not.toMatch( - /\s+at\s(?:.+?)\s\(__tests__\/runtime-error-test\.js/, + /\s+at\s(?:.+?)\s\(__tests__\/runtime_error.test\.js/, ); }); it('prints a stack trace for matching errors', () => { - const result = runJest('stack_trace', ['stack-trace-test.js']); + const result = runJest('stack_trace', ['stack_trace.test.js']); const stderr = result.stderr.toString(); expect(extractSummary(stderr).summary).toMatchSnapshot(); expect(result.status).toBe(1); - expect(stderr).toMatch(/\s+at\s(?:.+?)\s\(__tests__\/stack-trace-test\.js/); + expect(stderr).toMatch(/\s+at\s(?:.+?)\s\(__tests__\/stack_trace.test\.js/); }); it('does not print a stack trace for matching errors when --noStackTrace is given', () => { const result = runJest('stack_trace', [ - 'stack-trace-test.js', + 'stack_trace.test.js', '--noStackTrace', ]); const stderr = result.stderr.toString(); @@ -65,12 +65,12 @@ describe('Stack Trace', () => { expect(result.status).toBe(1); expect(stderr).not.toMatch( - /\s+at\s(?:.+?)\s\(__tests__\/stack-trace-test\.js/, + /\s+at\s(?:.+?)\s\(__tests__\/stack_trace.test\.js/, ); }); it('prints a stack trace for errors', () => { - const result = runJest('stack_trace', ['test-error-test.js']); + const result = runJest('stack_trace', ['test_error.test.js']); const stderr = result.stderr.toString(); expect(extractSummary(stderr).summary).toMatchSnapshot(); @@ -79,11 +79,11 @@ describe('Stack Trace', () => { expect(stderr).toMatch(/this is unexpected\./); expect(stderr).toMatch(/this is a string\. thrown/); - expect(stderr).toMatch(/\s+at\s(?:.+?)\s\(__tests__\/test-error-test\.js/); + expect(stderr).toMatch(/\s+at\s(?:.+?)\s\(__tests__\/test_error.test\.js/); // Make sure we show Jest's jest-resolve as part of the stack trace expect(stderr).toMatch( - /Cannot find module 'this-module-does-not-exist' from 'test-error-test\.js'/, + /Cannot find module 'this-module-does-not-exist' from 'test_error.test\.js'/, ); expect(stderr).toMatch( @@ -93,7 +93,7 @@ describe('Stack Trace', () => { it('prints a stack trace for errors without message in stack trace', () => { const result = runJest('stack_trace', [ - 'stack-trace-without-message-test.js', + 'stack_trace_without_message.test.js', ]); const stderr = result.stderr.toString(); @@ -102,13 +102,13 @@ describe('Stack Trace', () => { expect(stderr).toMatch(/important message/); expect(stderr).toMatch( - /\s+at\s(?:.+?)\s\(__tests__\/stack-trace-without-message-test\.js/, + /\s+at\s(?:.+?)\s\(__tests__\/stack_trace_without_message.test\.js/, ); }); it('does not print a stack trace for errors when --noStackTrace is given', () => { const result = runJest('stack_trace', [ - 'test-error-test.js', + 'test_error.test.js', '--noStackTrace', ]); const stderr = result.stderr.toString(); @@ -117,7 +117,7 @@ describe('Stack Trace', () => { expect(result.status).toBe(1); expect(stderr).not.toMatch( - /\s+at\s(?:.+?)\s\(__tests__\/test-error-test\.js/, + /\s+at\s(?:.+?)\s\(__tests__\/test_error.test\.js/, ); }); }); diff --git a/integration_tests/__tests__/symbol-test.js b/integration_tests/__tests__/symbol.test.js similarity index 100% rename from integration_tests/__tests__/symbol-test.js rename to integration_tests/__tests__/symbol.test.js diff --git a/integration_tests/__tests__/test-environment-test.js b/integration_tests/__tests__/test_environment.test.js similarity index 100% rename from integration_tests/__tests__/test-environment-test.js rename to integration_tests/__tests__/test_environment.test.js diff --git a/integration_tests/__tests__/test-in-root-test.js b/integration_tests/__tests__/test_in_root.test.js similarity index 100% rename from integration_tests/__tests__/test-in-root-test.js rename to integration_tests/__tests__/test_in_root.test.js diff --git a/integration_tests/__tests__/testNamePattern-test.js b/integration_tests/__tests__/test_name_pattern.test.js similarity index 100% rename from integration_tests/__tests__/testNamePattern-test.js rename to integration_tests/__tests__/test_name_pattern.test.js diff --git a/integration_tests/__tests__/testResultsProcessor-test.js b/integration_tests/__tests__/test_results_processor.test.js similarity index 100% rename from integration_tests/__tests__/testResultsProcessor-test.js rename to integration_tests/__tests__/test_results_processor.test.js diff --git a/integration_tests/__tests__/timeouts-test.js b/integration_tests/__tests__/timeouts.test.js similarity index 100% rename from integration_tests/__tests__/timeouts-test.js rename to integration_tests/__tests__/timeouts.test.js diff --git a/integration_tests/__tests__/timer-resetMocks-test.js b/integration_tests/__tests__/timer_reset_mocks.test.js similarity index 100% rename from integration_tests/__tests__/timer-resetMocks-test.js rename to integration_tests/__tests__/timer_reset_mocks.test.js diff --git a/integration_tests/__tests__/timer-useRealTimers-test.js b/integration_tests/__tests__/timer_use_real_timers.test.js similarity index 91% rename from integration_tests/__tests__/timer-useRealTimers-test.js rename to integration_tests/__tests__/timer_use_real_timers.test.js index 9116f0d5e603..e1a450b0d686 100644 --- a/integration_tests/__tests__/timer-useRealTimers-test.js +++ b/integration_tests/__tests__/timer_use_real_timers.test.js @@ -12,7 +12,7 @@ const runJest = require('../runJest'); test('useRealTimers cancels "timers": "fake" for whole test file', () => { - const result = runJest('timer-useRealTimers'); + const result = runJest('timer_use_real_timers'); expect(result.stdout).toMatch('API is not mocked with fake timers.'); expect(result.status).toBe(0); }); diff --git a/integration_tests/__tests__/toMatchSnapshot-test.js b/integration_tests/__tests__/to_match_snapshot.test.js similarity index 93% rename from integration_tests/__tests__/toMatchSnapshot-test.js rename to integration_tests/__tests__/to_match_snapshot.test.js index c1d683035328..d54359c45afe 100644 --- a/integration_tests/__tests__/toMatchSnapshot-test.js +++ b/integration_tests/__tests__/to_match_snapshot.test.js @@ -17,7 +17,7 @@ beforeEach(() => cleanup(TESTS_DIR)); afterAll(() => cleanup(TESTS_DIR)); test('basic support', () => { - const filename = 'basic-support-test.js'; + const filename = 'basic-support.test.js'; const template = makeTemplate( `test('snapshots', () => expect($1).toMatchSnapshot());`, ); @@ -40,7 +40,7 @@ test('basic support', () => { // This test below also covers how jest-editor-support creates terse messages // for letting a Snapshot update, so if the wording is updated, please edit - // /packages/jest-editor-support/src/TestReconciler.js + // /packages/jest-editor-support/src/test_reconciler.js { writeFiles(TESTS_DIR, { [filename]: template(['{apple: "updated value"}']), @@ -63,7 +63,7 @@ test('basic support', () => { }); test('error thrown before snapshot', () => { - const filename = 'error-thrown-before-snapshot-test.js'; + const filename = 'error-thrown-before-snapshot.test.js'; const template = makeTemplate(`test('snapshots', () => { expect($1).toBeTruthy(); expect($2).toMatchSnapshot(); @@ -95,7 +95,7 @@ test('error thrown before snapshot', () => { }); test('first snapshot fails, second passes', () => { - const filename = 'first-snapshot-fails-second-passes-test.js'; + const filename = 'first-snapshot-fails-second-passes.test.js'; const template = makeTemplate(`test('snapshots', () => { expect($1).toMatchSnapshot(); expect($2).toMatchSnapshot(); @@ -119,7 +119,7 @@ test('first snapshot fails, second passes', () => { }); test('does not mark snapshots as obsolete in skipped tests', () => { - const filename = 'no-obsolete-if-skipped-test.js'; + const filename = 'no-obsolete-if-skipped.test.js'; const template = makeTemplate(`test('snapshots', () => { expect(true).toBe(true); }); @@ -145,7 +145,7 @@ test('does not mark snapshots as obsolete in skipped tests', () => { }); test('accepts custom snapshot name', () => { - const filename = 'accept-custom-snapshot-name-test.js'; + const filename = 'accept-custom-snapshot-name.test.js'; const template = makeTemplate(`test('accepts custom snapshot name', () => { expect(true).toMatchSnapshot('custom-name'); }); diff --git a/integration_tests/__tests__/toThrowErrorMatchingSnapshot-test.js b/integration_tests/__tests__/to_throw_error_matching_snapshot.test.js similarity index 91% rename from integration_tests/__tests__/toThrowErrorMatchingSnapshot-test.js rename to integration_tests/__tests__/to_throw_error_matching_snapshot.test.js index 9ae48ab06600..86749f66af5e 100644 --- a/integration_tests/__tests__/toThrowErrorMatchingSnapshot-test.js +++ b/integration_tests/__tests__/to_throw_error_matching_snapshot.test.js @@ -17,7 +17,7 @@ beforeEach(() => cleanup(TESTS_DIR)); afterAll(() => cleanup(TESTS_DIR)); test('works fine when function throws error', () => { - const filename = 'works-fine-when-function-throws-error-test.js'; + const filename = 'works-fine-when-function-throws-error.test.js'; const template = makeTemplate(`test('works fine when function throws error', () => { expect(() => { throw new Error('apple'); }) .toThrowErrorMatchingSnapshot(); @@ -33,7 +33,7 @@ test('works fine when function throws error', () => { }); test(`throws the error if tested function didn't throw error`, () => { - const filename = 'throws-if-tested-function-did-not-throw-test.js'; + const filename = 'throws-if-tested-function-did-not-throw.test.js'; const template = makeTemplate(`test('throws the error if tested function did not throw error', () => { expect(() => {}).toThrowErrorMatchingSnapshot(); }); @@ -48,7 +48,7 @@ test(`throws the error if tested function didn't throw error`, () => { }); test('does not accept arguments', () => { - const filename = 'does-not-accept-arguments-test.js'; + const filename = 'does-not-accept-arguments.test.js'; const template = makeTemplate(`test('does not accept arguments', () => { expect(() => { throw new Error('apple'); }) .toThrowErrorMatchingSnapshot('foobar'); @@ -64,7 +64,7 @@ test('does not accept arguments', () => { }); test('cannot be used with .not', () => { - const filename = 'cannot-be-used-with-not-test.js'; + const filename = 'cannot-be-used-with-not.test.js'; const template = makeTemplate(`test('cannot be used with .not', () => { expect('').not.toThrowErrorMatchingSnapshot(); }); diff --git a/integration_tests/__tests__/transform-test.js b/integration_tests/__tests__/transform.test.js similarity index 92% rename from integration_tests/__tests__/transform-test.js rename to integration_tests/__tests__/transform.test.js index b2e7d69f472a..b4aded1db966 100644 --- a/integration_tests/__tests__/transform-test.js +++ b/integration_tests/__tests__/transform.test.js @@ -32,8 +32,8 @@ describe('babel-jest', () => { it('instruments only specific files and collects coverage', () => { const {stdout} = runJest(dir, ['--coverage', '--no-cache']); expect(stdout).toMatch('covered.js'); - expect(stdout).not.toMatch('not-covered.js'); - expect(stdout).not.toMatch('excluded-from-coverage.js'); + expect(stdout).not.toMatch('not_covered.js'); + expect(stdout).not.toMatch('excluded_from_coverage.js'); // coverage result should not change expect(stdout).toMatchSnapshot(); }); @@ -44,14 +44,14 @@ describe('no babel-jest', () => { it('fails with syntax error on flow types', () => { const {stderr} = runJest(dir, ['--no-cache']); - expect(stderr).toMatch(/FAIL.*fails-with-syntax-error/); + expect(stderr).toMatch(/FAIL.*fails_with_syntax_error/); expect(stderr).toMatch('SyntaxError: Unexpected token :'); }); test('instrumentation with no babel-jest', () => { const {stdout} = runJest(dir, ['--no-cache', '--coverage']); expect(stdout).toMatch('covered.js'); - expect(stdout).not.toMatch('excluded-from-coverage.js'); + expect(stdout).not.toMatch('excluded_from_coverage.js'); // coverage result should not change expect(stdout).toMatchSnapshot(); }); diff --git a/integration_tests/__tests__/typescript-coverage-test.js b/integration_tests/__tests__/typescript_coverage.test.js similarity index 100% rename from integration_tests/__tests__/typescript-coverage-test.js rename to integration_tests/__tests__/typescript_coverage.test.js diff --git a/integration_tests/__tests__/verbose-test.js b/integration_tests/__tests__/verbose.test.js similarity index 100% rename from integration_tests/__tests__/verbose-test.js rename to integration_tests/__tests__/verbose.test.js diff --git a/integration_tests/babel-plugin-jest-hoist/__tests__/integration-test.js b/integration_tests/babel-plugin-jest-hoist/__tests__/integration.test.js similarity index 100% rename from integration_tests/babel-plugin-jest-hoist/__tests__/integration-test.js rename to integration_tests/babel-plugin-jest-hoist/__tests__/integration.test.js diff --git a/integration_tests/babel-plugin-jest-hoist/__tests__/integration-automock-off-test.js b/integration_tests/babel-plugin-jest-hoist/__tests__/integration_automock_off.test.js similarity index 100% rename from integration_tests/babel-plugin-jest-hoist/__tests__/integration-automock-off-test.js rename to integration_tests/babel-plugin-jest-hoist/__tests__/integration_automock_off.test.js diff --git a/integration_tests/console/__tests__/console-test.js b/integration_tests/console/__tests__/console.test.js similarity index 100% rename from integration_tests/console/__tests__/console-test.js rename to integration_tests/console/__tests__/console.test.js diff --git a/integration_tests/coverage_report/__tests__/sum-test.js b/integration_tests/coverage_report/__tests__/sum.test.js similarity index 100% rename from integration_tests/coverage_report/__tests__/sum-test.js rename to integration_tests/coverage_report/__tests__/sum.test.js diff --git a/integration_tests/custom_reporters/__tests__/add-test.js b/integration_tests/custom_reporters/__tests__/add.test.js similarity index 100% rename from integration_tests/custom_reporters/__tests__/add-test.js rename to integration_tests/custom_reporters/__tests__/add.test.js diff --git a/integration_tests/custom_reporters/__tests__/add-fail-test.js b/integration_tests/custom_reporters/__tests__/add_fail.test.js similarity index 100% rename from integration_tests/custom_reporters/__tests__/add-fail-test.js rename to integration_tests/custom_reporters/__tests__/add_fail.test.js diff --git a/integration_tests/custom_reporters/package.json b/integration_tests/custom_reporters/package.json index 590f11ffe692..3c42adef4a3a 100644 --- a/integration_tests/custom_reporters/package.json +++ b/integration_tests/custom_reporters/package.json @@ -1,7 +1,7 @@ { "jest": { "reporters": [ - ["/reporters/TestReporter.js", { + ["/reporters/test_reporter.js", { "hello": "world", "dmitrii": "abramov", "christoph": "pojer" diff --git a/integration_tests/custom_reporters/reporters/IncompleteReporter.js b/integration_tests/custom_reporters/reporters/incomplete_reporter.js similarity index 100% rename from integration_tests/custom_reporters/reporters/IncompleteReporter.js rename to integration_tests/custom_reporters/reporters/incomplete_reporter.js diff --git a/integration_tests/custom_reporters/reporters/TestReporter.js b/integration_tests/custom_reporters/reporters/test_reporter.js similarity index 100% rename from integration_tests/custom_reporters/reporters/TestReporter.js rename to integration_tests/custom_reporters/reporters/test_reporter.js diff --git a/integration_tests/empty_suite_error/__tests__/empty-suite-test.js b/integration_tests/empty_suite_error/__tests__/empty_suite.test.js similarity index 100% rename from integration_tests/empty_suite_error/__tests__/empty-suite-test.js rename to integration_tests/empty_suite_error/__tests__/empty_suite.test.js diff --git a/integration_tests/env-test/__tests__/env-test.js b/integration_tests/env-test/__tests__/env.test.js similarity index 100% rename from integration_tests/env-test/__tests__/env-test.js rename to integration_tests/env-test/__tests__/env.test.js diff --git a/integration_tests/failures/__tests__/assertion-count-test.js b/integration_tests/failures/__tests__/assertion_count.test.js similarity index 100% rename from integration_tests/failures/__tests__/assertion-count-test.js rename to integration_tests/failures/__tests__/assertion_count.test.js diff --git a/integration_tests/failures/__tests__/node-assertion-error-test.js b/integration_tests/failures/__tests__/node_assertion_error.test.js similarity index 100% rename from integration_tests/failures/__tests__/node-assertion-error-test.js rename to integration_tests/failures/__tests__/node_assertion_error.test.js diff --git a/integration_tests/failures/__tests__/throw-number-test.js b/integration_tests/failures/__tests__/throw_number.test.js similarity index 100% rename from integration_tests/failures/__tests__/throw-number-test.js rename to integration_tests/failures/__tests__/throw_number.test.js diff --git a/integration_tests/failures/__tests__/throw-object-test.js b/integration_tests/failures/__tests__/throw_object.test.js similarity index 100% rename from integration_tests/failures/__tests__/throw-object-test.js rename to integration_tests/failures/__tests__/throw_object.test.js diff --git a/integration_tests/failures/__tests__/throw-string-test.js b/integration_tests/failures/__tests__/throw_string.test.js similarity index 100% rename from integration_tests/failures/__tests__/throw-string-test.js rename to integration_tests/failures/__tests__/throw_string.test.js diff --git a/integration_tests/jasmine_async/__tests__/concurrent-test.js b/integration_tests/jasmine_async/__tests__/concurrent.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/concurrent-test.js rename to integration_tests/jasmine_async/__tests__/concurrent.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_afterAll-test.js b/integration_tests/jasmine_async/__tests__/promise_after_all.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_afterAll-test.js rename to integration_tests/jasmine_async/__tests__/promise_after_all.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_afterEach-test.js b/integration_tests/jasmine_async/__tests__/promise_after_each.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_afterEach-test.js rename to integration_tests/jasmine_async/__tests__/promise_after_each.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_beforeAll-test.js b/integration_tests/jasmine_async/__tests__/promise_before_all.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_beforeAll-test.js rename to integration_tests/jasmine_async/__tests__/promise_before_all.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_beforeEach-test.js b/integration_tests/jasmine_async/__tests__/promise_before_each.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_beforeEach-test.js rename to integration_tests/jasmine_async/__tests__/promise_before_each.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_fit-test.js b/integration_tests/jasmine_async/__tests__/promise_fit.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_fit-test.js rename to integration_tests/jasmine_async/__tests__/promise_fit.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_it-test.js b/integration_tests/jasmine_async/__tests__/promise_it.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_it-test.js rename to integration_tests/jasmine_async/__tests__/promise_it.test.js diff --git a/integration_tests/jasmine_async/__tests__/promise_xit-test.js b/integration_tests/jasmine_async/__tests__/promise_xit.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/promise_xit-test.js rename to integration_tests/jasmine_async/__tests__/promise_xit.test.js diff --git a/integration_tests/jasmine_async/__tests__/returning_values-test.js b/integration_tests/jasmine_async/__tests__/returning_values.test.js similarity index 100% rename from integration_tests/jasmine_async/__tests__/returning_values-test.js rename to integration_tests/jasmine_async/__tests__/returning_values.test.js diff --git a/integration_tests/json_reporter/__tests__/sum-test.js b/integration_tests/json_reporter/__tests__/sum.test.js similarity index 100% rename from integration_tests/json_reporter/__tests__/sum-test.js rename to integration_tests/json_reporter/__tests__/sum.test.js diff --git a/integration_tests/list_tests/__tests__/dummy-test.js b/integration_tests/list_tests/__tests__/dummy.test.js similarity index 100% rename from integration_tests/list_tests/__tests__/dummy-test.js rename to integration_tests/list_tests/__tests__/dummy.test.js diff --git a/integration_tests/native-async-mock/__tests__/native-async-mock-test.js b/integration_tests/native-async-mock/__tests__/native_async_mock.test.js similarity index 100% rename from integration_tests/native-async-mock/__tests__/native-async-mock-test.js rename to integration_tests/native-async-mock/__tests__/native_async_mock.test.js diff --git a/integration_tests/node_path/__tests__/node_path-test.js b/integration_tests/node_path/__tests__/node_path.test.js similarity index 100% rename from integration_tests/node_path/__tests__/node_path-test.js rename to integration_tests/node_path/__tests__/node_path.test.js diff --git a/integration_tests/regex-(char-in-path/__tests__/regex-(char-in-path.test.js b/integration_tests/regex-(char-in-path/__tests__/regex_(char_in_path.test.js similarity index 100% rename from integration_tests/regex-(char-in-path/__tests__/regex-(char-in-path.test.js rename to integration_tests/regex-(char-in-path/__tests__/regex_(char_in_path.test.js diff --git a/integration_tests/resolve/__tests__/resolve-test.js b/integration_tests/resolve/__tests__/resolve.test.js similarity index 100% rename from integration_tests/resolve/__tests__/resolve-test.js rename to integration_tests/resolve/__tests__/resolve.test.js diff --git a/integration_tests/runtime-internal-module-registry/__tests__/runtime-internal-module-registry-test.js b/integration_tests/runtime-internal-module-registry/__tests__/runtime_internal_module_registry.test.js similarity index 100% rename from integration_tests/runtime-internal-module-registry/__tests__/runtime-internal-module-registry-test.js rename to integration_tests/runtime-internal-module-registry/__tests__/runtime_internal_module_registry.test.js diff --git a/integration_tests/set_immediate/__tests__/set-immediate-test.js b/integration_tests/set_immediate/__tests__/set_immediate.test.js similarity index 100% rename from integration_tests/set_immediate/__tests__/set-immediate-test.js rename to integration_tests/set_immediate/__tests__/set_immediate.test.js diff --git a/integration_tests/setup_test_framework_script_file_cli_config/__tests__/runner_patch-test.js b/integration_tests/setup_test_framework_script_file_cli_config/__tests__/runner_patch.test.js similarity index 100% rename from integration_tests/setup_test_framework_script_file_cli_config/__tests__/runner_patch-test.js rename to integration_tests/setup_test_framework_script_file_cli_config/__tests__/runner_patch.test.js diff --git a/integration_tests/setup_test_framework_script_file_cli_config/__tests__/test1-test.js b/integration_tests/setup_test_framework_script_file_cli_config/__tests__/test1.test.js similarity index 100% rename from integration_tests/setup_test_framework_script_file_cli_config/__tests__/test1-test.js rename to integration_tests/setup_test_framework_script_file_cli_config/__tests__/test1.test.js diff --git a/integration_tests/setup_test_framework_script_file_cli_config/__tests__/test2-test.js b/integration_tests/setup_test_framework_script_file_cli_config/__tests__/test2.test.js similarity index 100% rename from integration_tests/setup_test_framework_script_file_cli_config/__tests__/test2-test.js rename to integration_tests/setup_test_framework_script_file_cli_config/__tests__/test2.test.js diff --git a/integration_tests/snapshot-escape/__tests__/snapshot-test.js b/integration_tests/snapshot-escape/__tests__/snapshot.test.js similarity index 100% rename from integration_tests/snapshot-escape/__tests__/snapshot-test.js rename to integration_tests/snapshot-escape/__tests__/snapshot.test.js diff --git a/integration_tests/snapshot-escape/__tests__/snapshot-escape-regex.js b/integration_tests/snapshot-escape/__tests__/snapshot_escape_regex.js similarity index 100% rename from integration_tests/snapshot-escape/__tests__/snapshot-escape-regex.js rename to integration_tests/snapshot-escape/__tests__/snapshot_escape_regex.js diff --git a/integration_tests/snapshot-escape/__tests__/snapshot-escape-substitution-test.js b/integration_tests/snapshot-escape/__tests__/snapshot_escape_substitution.test.js similarity index 100% rename from integration_tests/snapshot-escape/__tests__/snapshot-escape-substitution-test.js rename to integration_tests/snapshot-escape/__tests__/snapshot_escape_substitution.test.js diff --git a/integration_tests/snapshot-serializers/__tests__/snapshot-test.js b/integration_tests/snapshot-serializers/__tests__/snapshot.test.js similarity index 100% rename from integration_tests/snapshot-serializers/__tests__/snapshot-test.js rename to integration_tests/snapshot-serializers/__tests__/snapshot.test.js diff --git a/integration_tests/snapshot/__tests__/second-snapshot-test.js b/integration_tests/snapshot/__tests__/second_snapshot.test.js similarity index 100% rename from integration_tests/snapshot/__tests__/second-snapshot-test.js rename to integration_tests/snapshot/__tests__/second_snapshot.test.js diff --git a/integration_tests/snapshot/__tests__/snapshot-test.js b/integration_tests/snapshot/__tests__/snapshot.test.js similarity index 100% rename from integration_tests/snapshot/__tests__/snapshot-test.js rename to integration_tests/snapshot/__tests__/snapshot.test.js diff --git a/integration_tests/stack_trace/__tests__/runtime-error-test.js b/integration_tests/stack_trace/__tests__/runtime_error.test.js similarity index 100% rename from integration_tests/stack_trace/__tests__/runtime-error-test.js rename to integration_tests/stack_trace/__tests__/runtime_error.test.js diff --git a/integration_tests/stack_trace/__tests__/stack-trace-test.js b/integration_tests/stack_trace/__tests__/stack_trace.test.js similarity index 100% rename from integration_tests/stack_trace/__tests__/stack-trace-test.js rename to integration_tests/stack_trace/__tests__/stack_trace.test.js diff --git a/integration_tests/stack_trace/__tests__/stack-trace-without-message-test.js b/integration_tests/stack_trace/__tests__/stack_trace_without_message.test.js similarity index 100% rename from integration_tests/stack_trace/__tests__/stack-trace-without-message-test.js rename to integration_tests/stack_trace/__tests__/stack_trace_without_message.test.js diff --git a/integration_tests/stack_trace/__tests__/test-error-test.js b/integration_tests/stack_trace/__tests__/test_error.test.js similarity index 100% rename from integration_tests/stack_trace/__tests__/test-error-test.js rename to integration_tests/stack_trace/__tests__/test_error.test.js diff --git a/integration_tests/test-environment/__tests__/env-test.js b/integration_tests/test-environment/__tests__/env.test.js similarity index 100% rename from integration_tests/test-environment/__tests__/env-test.js rename to integration_tests/test-environment/__tests__/env.test.js diff --git a/integration_tests/testNamePattern/__tests__/testNamePattern-test.js b/integration_tests/testNamePattern/__tests__/test_name_pattern.test.js similarity index 100% rename from integration_tests/testNamePattern/__tests__/testNamePattern-test.js rename to integration_tests/testNamePattern/__tests__/test_name_pattern.test.js diff --git a/integration_tests/testResultsProcessor/__tests__/processor-test.js b/integration_tests/testResultsProcessor/__tests__/processor.test.js similarity index 100% rename from integration_tests/testResultsProcessor/__tests__/processor-test.js rename to integration_tests/testResultsProcessor/__tests__/processor.test.js diff --git a/integration_tests/timer-resetMocks/with_resetMocks/timer_with_mock.test.js b/integration_tests/timer-resetMocks/with_resetMocks/timer_with_mock.test.js index 91cc4cc29fbf..30c0132f97b8 100644 --- a/integration_tests/timer-resetMocks/with_resetMocks/timer_with_mock.test.js +++ b/integration_tests/timer-resetMocks/with_resetMocks/timer_with_mock.test.js @@ -1,6 +1,7 @@ describe('timers', () => { it('should work before calling resetAllMocks', () => { const f = jest.fn(); + jest.useFakeTimers(); setImmediate(() => f()); jest.runAllImmediates(); expect(f.mock.calls.length).toBe(1); diff --git a/integration_tests/timer-useRealTimers/__tests__/use_real_timers.test.js b/integration_tests/timer_use_real_timers/__tests__/use_real_timers.test.js similarity index 100% rename from integration_tests/timer-useRealTimers/__tests__/use_real_timers.test.js rename to integration_tests/timer_use_real_timers/__tests__/use_real_timers.test.js diff --git a/integration_tests/timer-useRealTimers/package.json b/integration_tests/timer_use_real_timers/package.json similarity index 100% rename from integration_tests/timer-useRealTimers/package.json rename to integration_tests/timer_use_real_timers/package.json diff --git a/integration_tests/transform/babel-jest/__tests__/babel-jest-test.js b/integration_tests/transform/babel-jest/__tests__/babel_jest.test.js similarity index 100% rename from integration_tests/transform/babel-jest/__tests__/babel-jest-test.js rename to integration_tests/transform/babel-jest/__tests__/babel_jest.test.js diff --git a/integration_tests/transform/custom-instrumenting-preprocessor/__tests__/custom-preprocessor-test.js b/integration_tests/transform/custom-instrumenting-preprocessor/__tests__/custom_preprocessor.test.js similarity index 100% rename from integration_tests/transform/custom-instrumenting-preprocessor/__tests__/custom-preprocessor-test.js rename to integration_tests/transform/custom-instrumenting-preprocessor/__tests__/custom_preprocessor.test.js diff --git a/integration_tests/transform/multiple-transformers/__tests__/__snapshots__/multiple-transformers-test.js.snap b/integration_tests/transform/multiple-transformers/__tests__/__snapshots__/multiple_transformers.test.js.snap similarity index 100% rename from integration_tests/transform/multiple-transformers/__tests__/__snapshots__/multiple-transformers-test.js.snap rename to integration_tests/transform/multiple-transformers/__tests__/__snapshots__/multiple_transformers.test.js.snap diff --git a/integration_tests/transform/multiple-transformers/__tests__/multiple-transformers-test.js b/integration_tests/transform/multiple-transformers/__tests__/multiple_transformers.test.js similarity index 100% rename from integration_tests/transform/multiple-transformers/__tests__/multiple-transformers-test.js rename to integration_tests/transform/multiple-transformers/__tests__/multiple_transformers.test.js diff --git a/integration_tests/transform/no-babel-jest/__tests__/fails-with-syntax-error-test.js b/integration_tests/transform/no-babel-jest/__tests__/fails_with_syntax_error.test.js similarity index 100% rename from integration_tests/transform/no-babel-jest/__tests__/fails-with-syntax-error-test.js rename to integration_tests/transform/no-babel-jest/__tests__/fails_with_syntax_error.test.js diff --git a/integration_tests/utils.js b/integration_tests/utils.js index 112c3e1bf68d..0dda845eca52 100644 --- a/integration_tests/utils.js +++ b/integration_tests/utils.js @@ -65,7 +65,7 @@ const cleanup = (directory: string) => rimraf.sync(directory); * '/home/tmp', * { * 'package.json': '{}', - * '__tests__/test-test.js': 'test("lol")', + * '__tests__/test.test.js': 'test("lol")', * } * ); */ diff --git a/integration_tests/verbose_reporter/__tests__/verbose-test.js b/integration_tests/verbose_reporter/__tests__/verbose.test.js similarity index 100% rename from integration_tests/verbose_reporter/__tests__/verbose-test.js rename to integration_tests/verbose_reporter/__tests__/verbose.test.js diff --git a/package.json b/package.json index fe8499402819..ff6a5ffd4f7d 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ }, "setupTestFrameworkScriptFile": "/testSetupFile.js", "snapshotSerializers": [ - "/packages/pretty-format/build/plugins/ConvertAnsi.js" + "/packages/pretty-format/build/plugins/convert_ansi.js" ], "testEnvironment": "./packages/jest-environment-node", "testPathIgnorePatterns": [ @@ -112,7 +112,7 @@ "/packages/.*/build-es5" ], "testMatch": [ - "**/*-test.js" + "**/*.test.js" ] } } diff --git a/packages/eslint-plugin-jest/src/index.js b/packages/eslint-plugin-jest/src/index.js index e3899b0c70ba..32791fe38b02 100644 --- a/packages/eslint-plugin-jest/src/index.js +++ b/packages/eslint-plugin-jest/src/index.js @@ -8,10 +8,10 @@ * @flow */ -import noDisabledTests from './rules/no-disabled-tests'; -import noFocusedTests from './rules/no-focused-tests'; -import noIdenticalTitle from './rules/no-identical-title'; -import validExpect from './rules/valid-expect'; +import noDisabledTests from './rules/no_disabled_tests'; +import noFocusedTests from './rules/no_focused_tests'; +import noIdenticalTitle from './rules/no_identical_title'; +import validExpect from './rules/valid_expect'; module.exports = { configs: { diff --git a/packages/eslint-plugin-jest/src/rules/__tests__/no-focused-tests-test.js b/packages/eslint-plugin-jest/src/rules/__tests__/no_focused_tests.test.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/__tests__/no-focused-tests-test.js rename to packages/eslint-plugin-jest/src/rules/__tests__/no_focused_tests.test.js diff --git a/packages/eslint-plugin-jest/src/rules/__tests__/no-identical-title-test.js b/packages/eslint-plugin-jest/src/rules/__tests__/no_identical_title.test.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/__tests__/no-identical-title-test.js rename to packages/eslint-plugin-jest/src/rules/__tests__/no_identical_title.test.js diff --git a/packages/eslint-plugin-jest/src/rules/__tests__/no-skipped-tests-test.js b/packages/eslint-plugin-jest/src/rules/__tests__/no_skipped_tests.test.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/__tests__/no-skipped-tests-test.js rename to packages/eslint-plugin-jest/src/rules/__tests__/no_skipped_tests.test.js diff --git a/packages/eslint-plugin-jest/src/rules/__tests__/valid-expect-test.js b/packages/eslint-plugin-jest/src/rules/__tests__/valid_expect.test.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/__tests__/valid-expect-test.js rename to packages/eslint-plugin-jest/src/rules/__tests__/valid_expect.test.js diff --git a/packages/eslint-plugin-jest/src/rules/no-disabled-tests.js b/packages/eslint-plugin-jest/src/rules/no_disabled_tests.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/no-disabled-tests.js rename to packages/eslint-plugin-jest/src/rules/no_disabled_tests.js diff --git a/packages/eslint-plugin-jest/src/rules/no-focused-tests.js b/packages/eslint-plugin-jest/src/rules/no_focused_tests.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/no-focused-tests.js rename to packages/eslint-plugin-jest/src/rules/no_focused_tests.js diff --git a/packages/eslint-plugin-jest/src/rules/no-identical-title.js b/packages/eslint-plugin-jest/src/rules/no_identical_title.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/no-identical-title.js rename to packages/eslint-plugin-jest/src/rules/no_identical_title.js diff --git a/packages/eslint-plugin-jest/src/rules/valid-expect.js b/packages/eslint-plugin-jest/src/rules/valid_expect.js similarity index 100% rename from packages/eslint-plugin-jest/src/rules/valid-expect.js rename to packages/eslint-plugin-jest/src/rules/valid_expect.js diff --git a/packages/jest-changed-files/src/__tests__/git-test.js b/packages/jest-changed-files/src/__tests__/git.test.js similarity index 100% rename from packages/jest-changed-files/src/__tests__/git-test.js rename to packages/jest-changed-files/src/__tests__/git.test.js diff --git a/packages/jest-changed-files/src/__tests__/hg-test.js b/packages/jest-changed-files/src/__tests__/hg.test.js similarity index 100% rename from packages/jest-changed-files/src/__tests__/hg-test.js rename to packages/jest-changed-files/src/__tests__/hg.test.js diff --git a/packages/jest-circus/src/eventHandler.js b/packages/jest-circus/src/event_handler.js similarity index 100% rename from packages/jest-circus/src/eventHandler.js rename to packages/jest-circus/src/event_handler.js diff --git a/packages/jest-circus/src/formatNodeAssertErrors.js b/packages/jest-circus/src/format_node_assert_errors.js similarity index 98% rename from packages/jest-circus/src/formatNodeAssertErrors.js rename to packages/jest-circus/src/format_node_assert_errors.js index ed4d022afb02..be326feafd4d 100644 --- a/packages/jest-circus/src/formatNodeAssertErrors.js +++ b/packages/jest-circus/src/format_node_assert_errors.js @@ -8,7 +8,7 @@ * @flow */ -import type {DiffOptions} from 'jest-diff/src/diffStrings'; +import type {DiffOptions} from 'jest-diff/src/diff_strings.js'; import type {Event, State} from '../types'; const {printReceived, printExpected} = require('jest-matcher-utils'); diff --git a/packages/jest-circus/src/legacy_code_todo_rewrite/jest-adapter.js b/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter.js similarity index 97% rename from packages/jest-circus/src/legacy_code_todo_rewrite/jest-adapter.js rename to packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter.js index 6047ff2b6ce4..47ce069bfa99 100644 --- a/packages/jest-circus/src/legacy_code_todo_rewrite/jest-adapter.js +++ b/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter.js @@ -28,7 +28,7 @@ const jestAdapter = async ( runAndTransformResultsToJestFormat, } = runtime.requireInternalModule(FRAMEWORK_INITIALIZER); - runtime.requireInternalModule(path.resolve(__dirname, './jest-expect.js'))({ + runtime.requireInternalModule(path.resolve(__dirname, './jest_expect.js'))({ expand: globalConfig.expand, }); diff --git a/packages/jest-circus/src/legacy_code_todo_rewrite/jest-adapter-init.js b/packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js similarity index 100% rename from packages/jest-circus/src/legacy_code_todo_rewrite/jest-adapter-init.js rename to packages/jest-circus/src/legacy_code_todo_rewrite/jest_adapter_init.js diff --git a/packages/jest-circus/src/legacy_code_todo_rewrite/jest-expect.js b/packages/jest-circus/src/legacy_code_todo_rewrite/jest_expect.js similarity index 100% rename from packages/jest-circus/src/legacy_code_todo_rewrite/jest-expect.js rename to packages/jest-circus/src/legacy_code_todo_rewrite/jest_expect.js diff --git a/packages/jest-circus/src/state.js b/packages/jest-circus/src/state.js index 20b0dbe272fa..1d58be08aa67 100644 --- a/packages/jest-circus/src/state.js +++ b/packages/jest-circus/src/state.js @@ -11,8 +11,8 @@ import type {Event, State, EventHandler} from '../types'; import {makeDescribe} from './utils'; -import eventHandler from './eventHandler'; -import formatNodeAssertErrors from './formatNodeAssertErrors'; +import eventHandler from './event_handler'; +import formatNodeAssertErrors from './format_node_assert_errors'; const eventHandlers: Array = [ eventHandler, diff --git a/packages/jest-cli/src/__tests__/__snapshots__/generateEmptyCoverage-test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/generate_empty_coverage.test.js.snap similarity index 100% rename from packages/jest-cli/src/__tests__/__snapshots__/generateEmptyCoverage-test.js.snap rename to packages/jest-cli/src/__tests__/__snapshots__/generate_empty_coverage.test.js.snap diff --git a/packages/jest-cli/src/__tests__/__snapshots__/watch-test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/watch.test.js.snap similarity index 100% rename from packages/jest-cli/src/__tests__/__snapshots__/watch-test.js.snap rename to packages/jest-cli/src/__tests__/__snapshots__/watch.test.js.snap diff --git a/packages/jest-cli/src/__tests__/__snapshots__/watch-filename-pattern-mode-test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/watch_filename_pattern_mode.test.js.snap similarity index 100% rename from packages/jest-cli/src/__tests__/__snapshots__/watch-filename-pattern-mode-test.js.snap rename to packages/jest-cli/src/__tests__/__snapshots__/watch_filename_pattern_mode.test.js.snap diff --git a/packages/jest-cli/src/__tests__/__snapshots__/watch-test-name-pattern-mode-test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/watch_test_name_pattern_mode.test.js.snap similarity index 100% rename from packages/jest-cli/src/__tests__/__snapshots__/watch-test-name-pattern-mode-test.js.snap rename to packages/jest-cli/src/__tests__/__snapshots__/watch_test_name_pattern_mode.test.js.snap diff --git a/packages/jest-cli/src/__tests__/generateEmptyCoverage-test.js b/packages/jest-cli/src/__tests__/generate_empty_coverage.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/generateEmptyCoverage-test.js rename to packages/jest-cli/src/__tests__/generate_empty_coverage.test.js diff --git a/packages/jest-cli/src/__tests__/globals-test.js b/packages/jest-cli/src/__tests__/globals.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/globals-test.js rename to packages/jest-cli/src/__tests__/globals.test.js diff --git a/packages/jest-cli/src/__tests__/SearchSource-test.js b/packages/jest-cli/src/__tests__/search_source.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/SearchSource-test.js rename to packages/jest-cli/src/__tests__/search_source.test.js diff --git a/packages/jest-cli/src/__tests__/TestRunner-test.js b/packages/jest-cli/src/__tests__/test_runner.test.js similarity index 78% rename from packages/jest-cli/src/__tests__/TestRunner-test.js rename to packages/jest-cli/src/__tests__/test_runner.test.js index 795c97b36b26..1a86a2cceb33 100644 --- a/packages/jest-cli/src/__tests__/TestRunner-test.js +++ b/packages/jest-cli/src/__tests__/test_runner.test.js @@ -44,12 +44,15 @@ describe('_createInBandTestRun()', () => { const globalConfig = {watch: true}; const config = {rootDir: '/path/'}; const rawModuleMap = jest.fn(); - const context = {config, moduleMap: {getRawModuleMap: () => rawModuleMap}}; + const context = { + config, + moduleMap: {getRawModuleMap: () => rawModuleMap}, + }; const runner = new TestRunner(globalConfig, {maxWorkers: 2}); return runner ._createParallelTestRun( - [{context, path: './file-test.js'}, {context, path: './file2-test.js'}], + [{context, path: './file.test.js'}, {context, path: './file2.test.js'}], new TestWatcher({isWatchMode: globalConfig.watch}), () => {}, () => {}, @@ -57,11 +60,11 @@ describe('_createInBandTestRun()', () => { .then(() => { expect(workerFarmMock.mock.calls).toEqual([ [ - {config, globalConfig, path: './file-test.js', rawModuleMap}, + {config, globalConfig, path: './file.test.js', rawModuleMap}, expect.any(Function), ], [ - {config, globalConfig, path: './file2-test.js', rawModuleMap}, + {config, globalConfig, path: './file2.test.js', rawModuleMap}, expect.any(Function), ], ]); @@ -76,7 +79,7 @@ describe('_createInBandTestRun()', () => { return runner ._createParallelTestRun( - [{context, path: './file-test.js'}, {context, path: './file2-test.js'}], + [{context, path: './file.test.js'}, {context, path: './file2.test.js'}], new TestWatcher({isWatchMode: globalConfig.watch}), () => {}, () => {}, @@ -84,11 +87,21 @@ describe('_createInBandTestRun()', () => { .then(() => { expect(workerFarmMock.mock.calls).toEqual([ [ - {config, globalConfig, path: './file-test.js', rawModuleMap: null}, + { + config, + globalConfig, + path: './file.test.js', + rawModuleMap: null, + }, expect.any(Function), ], [ - {config, globalConfig, path: './file2-test.js', rawModuleMap: null}, + { + config, + globalConfig, + path: './file2.test.js', + rawModuleMap: null, + }, expect.any(Function), ], ]); diff --git a/packages/jest-cli/src/__tests__/TestSequencer-test.js b/packages/jest-cli/src/__tests__/test_sequencer.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/TestSequencer-test.js rename to packages/jest-cli/src/__tests__/test_sequencer.test.js diff --git a/packages/jest-cli/src/__tests__/watch-test.js b/packages/jest-cli/src/__tests__/watch.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/watch-test.js rename to packages/jest-cli/src/__tests__/watch.test.js diff --git a/packages/jest-cli/src/__tests__/watch-filename-pattern-mode-test.js b/packages/jest-cli/src/__tests__/watch_filename_pattern_mode.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/watch-filename-pattern-mode-test.js rename to packages/jest-cli/src/__tests__/watch_filename_pattern_mode.test.js diff --git a/packages/jest-cli/src/__tests__/watch-test-name-pattern-mode-test.js b/packages/jest-cli/src/__tests__/watch_test_name_pattern_mode.test.js similarity index 100% rename from packages/jest-cli/src/__tests__/watch-test-name-pattern-mode-test.js rename to packages/jest-cli/src/__tests__/watch_test_name_pattern_mode.test.js diff --git a/packages/jest-cli/src/lib/__tests__/__snapshots__/formatTestNameByPattern-test.js.snap b/packages/jest-cli/src/lib/__tests__/__snapshots__/format_test_name_by_pattern.test.js.snap similarity index 100% rename from packages/jest-cli/src/lib/__tests__/__snapshots__/formatTestNameByPattern-test.js.snap rename to packages/jest-cli/src/lib/__tests__/__snapshots__/format_test_name_by_pattern.test.js.snap diff --git a/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap b/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight.test.js.snap similarity index 68% rename from packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap rename to packages/jest-cli/src/lib/__tests__/__snapshots__/highlight.test.js.snap index 803e3b8c5dd6..f9e7d455a94a 100644 --- a/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap +++ b/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight.test.js.snap @@ -1,77 +1,77 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dims everything when there is no match 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`dims everything when there is no match 1`] = `"jest-cli/__tests__/watch.test.js"`; -exports[`dims everything when there is no match 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`dims everything when there is no match 2`] = `"...t-cli/__tests__/watch.test.js"`; -exports[`dims everything when there is no match 3`] = `".../__tests__/watch-test.js"`; +exports[`dims everything when there is no match 3`] = `".../__tests__/watch.test.js"`; -exports[`dims everything when there is no match 4`] = `"...sts__/watch-test.js"`; +exports[`dims everything when there is no match 4`] = `"...sts__/watch.test.js"`; -exports[`dims everything when there is no match 5`] = `"...watch-test.js"`; +exports[`dims everything when there is no match 5`] = `"...watch.test.js"`; -exports[`dims everything when there is no match 6`] = `"...-test.js"`; +exports[`dims everything when there is no match 6`] = `"....test.js"`; exports[`dims everything when there is no match 7`] = `"....js"`; -exports[`dims everything when there is no match 8`] = `"./watch-test.js"`; +exports[`dims everything when there is no match 8`] = `"./watch.test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 1`] = `"jest-cli/__tests__/watch.test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 2`] = `"...t-cli/__tests__/watch.test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 3`] = `".../__tests__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 3`] = `".../__tests__/watch.test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 4`] = `"...sts__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 4`] = `"...sts__/watch.test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 5`] = `"...watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 5`] = `"...watch.test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 6`] = `"...-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 6`] = `"....test.js"`; exports[`highlight the trimmed part when there is only a rootDir match 7`] = `"....js"`; -exports[`highlight the trimmed part when there is only a rootDir match 8`] = `"./watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 8`] = `"./watch.test.js"`; -exports[`highlights everything when there is a full match 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`highlights everything when there is a full match 1`] = `"jest-cli/__tests__/watch.test.js"`; -exports[`highlights everything when there is a full match 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlights everything when there is a full match 2`] = `"...t-cli/__tests__/watch.test.js"`; -exports[`highlights everything when there is a full match 3`] = `".../__tests__/watch-test.js"`; +exports[`highlights everything when there is a full match 3`] = `".../__tests__/watch.test.js"`; -exports[`highlights everything when there is a full match 4`] = `"...sts__/watch-test.js"`; +exports[`highlights everything when there is a full match 4`] = `"...sts__/watch.test.js"`; -exports[`highlights everything when there is a full match 5`] = `"...watch-test.js"`; +exports[`highlights everything when there is a full match 5`] = `"...watch.test.js"`; -exports[`highlights everything when there is a full match 6`] = `"...-test.js"`; +exports[`highlights everything when there is a full match 6`] = `"....test.js"`; exports[`highlights everything when there is a full match 7`] = `"....js"`; -exports[`highlights everything when there is a full match 8`] = `"./watch-test.js"`; +exports[`highlights everything when there is a full match 8`] = `"./watch.test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 1`] = `"jest-cli/__tests__/watch.test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 2`] = `"...t-cli/__tests__/watch.test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 3`] = `".../__tests__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 3`] = `".../__tests__/watch.test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 4`] = `"...sts__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 4`] = `"...sts__/watch.test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 5`] = `"...watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 5`] = `"...watch.test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 6`] = `"...-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 6`] = `"....test.js"`; exports[`highlights part of file name when there is a partially match of the file name 7`] = `"....js"`; -exports[`highlights part of file name when there is a partially match of the file name 8`] = `"./watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 8`] = `"./watch.test.js"`; -exports[`highlights the trimmed part there is a non visible match 1`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 1`] = `"...t-cli/__tests__/watch.test.js"`; -exports[`highlights the trimmed part there is a non visible match 2`] = `".../__tests__/watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 2`] = `".../__tests__/watch.test.js"`; -exports[`highlights the trimmed part there is a non visible match 3`] = `"...sts__/watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 3`] = `"...sts__/watch.test.js"`; -exports[`highlights the trimmed part there is a non visible match 4`] = `"...watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 4`] = `"...watch.test.js"`; -exports[`highlights the trimmed part there is a non visible match 5`] = `"...-test.js"`; +exports[`highlights the trimmed part there is a non visible match 5`] = `"....test.js"`; exports[`highlights the trimmed part there is a non visible match 6`] = `"....js"`; diff --git a/packages/jest-cli/src/lib/__tests__/formatTestNameByPattern-test.js b/packages/jest-cli/src/lib/__tests__/format_test_name_by_pattern.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/formatTestNameByPattern-test.js rename to packages/jest-cli/src/lib/__tests__/format_test_name_by_pattern.test.js diff --git a/packages/jest-cli/src/lib/__tests__/getMaxWorkers-test.js b/packages/jest-cli/src/lib/__tests__/get_max_workers.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/getMaxWorkers-test.js rename to packages/jest-cli/src/lib/__tests__/get_max_workers.test.js diff --git a/packages/jest-cli/src/lib/__tests__/highlight-test.js b/packages/jest-cli/src/lib/__tests__/highlight.test.js similarity index 86% rename from packages/jest-cli/src/lib/__tests__/highlight-test.js rename to packages/jest-cli/src/lib/__tests__/highlight.test.js index 5544977dbba8..f94d8c08de90 100644 --- a/packages/jest-cli/src/lib/__tests__/highlight-test.js +++ b/packages/jest-cli/src/lib/__tests__/highlight.test.js @@ -13,16 +13,16 @@ const highlight = require('../highlight'); const rootDir = '/Users/foo/dev/jest'; -const rawPath = rootDir + '/jest-cli/__tests__/watch-test.js'; +const rawPath = rootDir + '/jest-cli/__tests__/watch.test.js'; const relativePaths = [ - 'jest-cli/__tests__/watch-test.js', - '...t-cli/__tests__/watch-test.js', - '.../__tests__/watch-test.js', - '...sts__/watch-test.js', - '...watch-test.js', - '...-test.js', + 'jest-cli/__tests__/watch.test.js', + '...t-cli/__tests__/watch.test.js', + '.../__tests__/watch.test.js', + '...sts__/watch.test.js', + '...watch.test.js', + '....test.js', '....js', - './watch-test.js', + './watch.test.js', ]; it('highlight the trimmed part when there is only a rootDir match', () => { diff --git a/packages/jest-cli/src/lib/__tests__/isValidPath-test.js b/packages/jest-cli/src/lib/__tests__/is_valid_path.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/isValidPath-test.js rename to packages/jest-cli/src/lib/__tests__/is_valid_path.test.js diff --git a/packages/jest-cli/src/lib/__tests__/logDebugMessages-test.js b/packages/jest-cli/src/lib/__tests__/log_debug_messages.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/logDebugMessages-test.js rename to packages/jest-cli/src/lib/__tests__/log_debug_messages.test.js diff --git a/packages/jest-cli/src/lib/__tests__/Prompt-test.js b/packages/jest-cli/src/lib/__tests__/prompt.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/Prompt-test.js rename to packages/jest-cli/src/lib/__tests__/prompt.test.js diff --git a/packages/jest-cli/src/lib/__tests__/scrollList-test.js b/packages/jest-cli/src/lib/__tests__/scroll_list.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/scrollList-test.js rename to packages/jest-cli/src/lib/__tests__/scroll_list.test.js diff --git a/packages/jest-cli/src/lib/__tests__/validatePattern-test.js b/packages/jest-cli/src/lib/__tests__/validate_pattern.test.js similarity index 100% rename from packages/jest-cli/src/lib/__tests__/validatePattern-test.js rename to packages/jest-cli/src/lib/__tests__/validate_pattern.test.js diff --git a/packages/jest-cli/src/reporters/__tests__/__snapshots__/utils-test.js.snap b/packages/jest-cli/src/reporters/__tests__/__snapshots__/utils.test.js.snap similarity index 100% rename from packages/jest-cli/src/reporters/__tests__/__snapshots__/utils-test.js.snap rename to packages/jest-cli/src/reporters/__tests__/__snapshots__/utils.test.js.snap diff --git a/packages/jest-cli/src/reporters/__tests__/CoverageReporter-test.js b/packages/jest-cli/src/reporters/__tests__/coverage_reporter.test.js similarity index 100% rename from packages/jest-cli/src/reporters/__tests__/CoverageReporter-test.js rename to packages/jest-cli/src/reporters/__tests__/coverage_reporter.test.js diff --git a/packages/jest-cli/src/reporters/__tests__/CoverageWorker-test.js b/packages/jest-cli/src/reporters/__tests__/coverage_worker.test.js similarity index 100% rename from packages/jest-cli/src/reporters/__tests__/CoverageWorker-test.js rename to packages/jest-cli/src/reporters/__tests__/coverage_worker.test.js diff --git a/packages/jest-cli/src/reporters/__tests__/utils-test.js b/packages/jest-cli/src/reporters/__tests__/utils.test.js similarity index 100% rename from packages/jest-cli/src/reporters/__tests__/utils-test.js rename to packages/jest-cli/src/reporters/__tests__/utils.test.js diff --git a/packages/jest-cli/src/reporters/__tests__/VerboseReporter-test.js b/packages/jest-cli/src/reporters/__tests__/verbose_reporter.test.js similarity index 100% rename from packages/jest-cli/src/reporters/__tests__/VerboseReporter-test.js rename to packages/jest-cli/src/reporters/__tests__/verbose_reporter.test.js diff --git a/packages/jest-config/src/__tests__/__snapshots__/normalize-test.js.snap b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap similarity index 100% rename from packages/jest-config/src/__tests__/__snapshots__/normalize-test.js.snap rename to packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap diff --git a/packages/jest-config/src/__tests__/normalize-test.js b/packages/jest-config/src/__tests__/normalize.test.js similarity index 100% rename from packages/jest-config/src/__tests__/normalize-test.js rename to packages/jest-config/src/__tests__/normalize.test.js diff --git a/packages/jest-config/src/__tests__/setFromArgv-test.js b/packages/jest-config/src/__tests__/set_from_argv.test.js similarity index 97% rename from packages/jest-config/src/__tests__/setFromArgv-test.js rename to packages/jest-config/src/__tests__/set_from_argv.test.js index 7f118d5f41e7..13fef653a613 100644 --- a/packages/jest-config/src/__tests__/setFromArgv-test.js +++ b/packages/jest-config/src/__tests__/set_from_argv.test.js @@ -8,7 +8,7 @@ */ 'use strict'; -const setFromArgv = require('../setFromArgv'); +const setFromArgv = require('../set_from_argv'); test('maps special values to valid options', () => { const options = {}; diff --git a/packages/jest-config/src/findConfig.js b/packages/jest-config/src/find_config.js similarity index 100% rename from packages/jest-config/src/findConfig.js rename to packages/jest-config/src/find_config.js diff --git a/packages/jest-config/src/index.js b/packages/jest-config/src/index.js index 21bfc5e2afd1..d9c4f1859113 100644 --- a/packages/jest-config/src/index.js +++ b/packages/jest-config/src/index.js @@ -13,7 +13,7 @@ import type {GlobalConfig, ProjectConfig} from 'types/Config'; import path from 'path'; import {getTestEnvironment, isJSONString} from './utils'; -import findConfig from './findConfig'; +import findConfig from './find_config'; import normalize from './normalize'; function readConfig( diff --git a/packages/jest-config/src/normalize.js b/packages/jest-config/src/normalize.js index e9b596f951ba..2608c62f3fd5 100644 --- a/packages/jest-config/src/normalize.js +++ b/packages/jest-config/src/normalize.js @@ -31,11 +31,11 @@ import { DEFAULT_JS_PATTERN, DEFAULT_REPORTER_LABEL, } from './constants'; -import {validateReporters} from './reporterValidationErrors'; +import {validateReporters} from './reporter_validation_errors'; import DEFAULT_CONFIG from './defaults'; import DEPRECATED_CONFIG from './deprecated'; -import setFromArgv from './setFromArgv'; -import VALID_CONFIG from './validConfig'; +import setFromArgv from './set_from_argv'; +import VALID_CONFIG from './valid_config'; const ERROR = `${BULLET}Validation Error`; const JSON_EXTENSION = '.json'; const PRESET_NAME = 'jest-preset' + JSON_EXTENSION; diff --git a/packages/jest-config/src/reporterValidationErrors.js b/packages/jest-config/src/reporter_validation_errors.js similarity index 100% rename from packages/jest-config/src/reporterValidationErrors.js rename to packages/jest-config/src/reporter_validation_errors.js diff --git a/packages/jest-config/src/setFromArgv.js b/packages/jest-config/src/set_from_argv.js similarity index 100% rename from packages/jest-config/src/setFromArgv.js rename to packages/jest-config/src/set_from_argv.js diff --git a/packages/jest-config/src/validConfig.js b/packages/jest-config/src/valid_config.js similarity index 100% rename from packages/jest-config/src/validConfig.js rename to packages/jest-config/src/valid_config.js diff --git a/packages/jest-diff/src/__tests__/__snapshots__/diff-test.js.snap b/packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap similarity index 100% rename from packages/jest-diff/src/__tests__/__snapshots__/diff-test.js.snap rename to packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap diff --git a/packages/jest-diff/src/__tests__/diff-test.js b/packages/jest-diff/src/__tests__/diff.test.js similarity index 100% rename from packages/jest-diff/src/__tests__/diff-test.js rename to packages/jest-diff/src/__tests__/diff.test.js diff --git a/packages/jest-diff/src/diffStrings.js b/packages/jest-diff/src/diff_strings.js similarity index 100% rename from packages/jest-diff/src/diffStrings.js rename to packages/jest-diff/src/diff_strings.js diff --git a/packages/jest-diff/src/index.js b/packages/jest-diff/src/index.js index 0d56f9374cdd..be6b39a0d7b7 100644 --- a/packages/jest-diff/src/index.js +++ b/packages/jest-diff/src/index.js @@ -8,12 +8,12 @@ * @flow */ -import type {DiffOptions} from './diffStrings'; +import type {DiffOptions} from './diff_strings'; import prettyFormat from 'pretty-format'; import chalk from 'chalk'; import getType from 'jest-get-type'; -import diffStrings from './diffStrings'; +import diffStrings from './diff_strings'; import {NO_DIFF_MESSAGE, SIMILAR_MESSAGE} from './constants'; const { diff --git a/packages/jest-docblock/src/__tests__/index-test.js b/packages/jest-docblock/src/__tests__/index.test.js similarity index 100% rename from packages/jest-docblock/src/__tests__/index-test.js rename to packages/jest-docblock/src/__tests__/index.test.js diff --git a/packages/jest-editor-support/src/__tests__/parsers/BabylonParser-test.js b/packages/jest-editor-support/src/__tests__/parsers/babylon_parser.test.js similarity index 87% rename from packages/jest-editor-support/src/__tests__/parsers/BabylonParser-test.js rename to packages/jest-editor-support/src/__tests__/parsers/babylon_parser.test.js index e5ab15171839..73d6c7b325e0 100644 --- a/packages/jest-editor-support/src/__tests__/parsers/BabylonParser-test.js +++ b/packages/jest-editor-support/src/__tests__/parsers/babylon_parser.test.js @@ -8,7 +8,7 @@ 'use strict'; -const {parse} = require('../../parsers/BabylonParser'); +const {parse} = require('../../parsers/babylon_parser'); const {parserTests} = require('../../../../../fixtures/parserTests'); parserTests(parse); diff --git a/packages/jest-editor-support/src/__tests__/ProjectWorkspace-test.js b/packages/jest-editor-support/src/__tests__/project_workspace.test.js similarity index 91% rename from packages/jest-editor-support/src/__tests__/ProjectWorkspace-test.js rename to packages/jest-editor-support/src/__tests__/project_workspace.test.js index bc98bebfc496..9aa0d3cd3dba 100644 --- a/packages/jest-editor-support/src/__tests__/ProjectWorkspace-test.js +++ b/packages/jest-editor-support/src/__tests__/project_workspace.test.js @@ -8,7 +8,7 @@ 'use strict'; -const ProjectWorkspace = require('../ProjectWorkspace'); +const ProjectWorkspace = require('../project_workspace'); describe('setup', () => { it('sets itself up fom the constructor', () => { diff --git a/packages/jest-editor-support/src/__tests__/Runner-test.js b/packages/jest-editor-support/src/__tests__/runner.test.js similarity index 95% rename from packages/jest-editor-support/src/__tests__/Runner-test.js rename to packages/jest-editor-support/src/__tests__/runner.test.js index b0b5dd7b452d..68022edcc81f 100644 --- a/packages/jest-editor-support/src/__tests__/Runner-test.js +++ b/packages/jest-editor-support/src/__tests__/runner.test.js @@ -12,7 +12,7 @@ const {EventEmitter} = require('events'); const path = require('path'); const {readFileSync} = require('fs'); const fixtures = path.resolve(__dirname, '../../../../fixtures'); -const ProjectWorkspace = require('../ProjectWorkspace'); +const ProjectWorkspace = require('../project_workspace'); // Replace `readFile` with `readFileSync` so we don't get multiple threads jest.doMock('fs', () => { @@ -28,13 +28,13 @@ jest.doMock('fs', () => { // Let's us use a per-test "jest process" let mockDebugProcess = {}; const mockCreateProcess = jest.fn(() => mockDebugProcess); -jest.doMock('../Process.js', () => { +jest.doMock('../process.js', () => { return { createProcess: mockCreateProcess, }; }); -const Runner = require('../Runner'); +const Runner = require('../runner'); describe('events', () => { let runner; diff --git a/packages/jest-editor-support/src/__tests__/Settings-test.js b/packages/jest-editor-support/src/__tests__/settings.test.js similarity index 95% rename from packages/jest-editor-support/src/__tests__/Settings-test.js rename to packages/jest-editor-support/src/__tests__/settings.test.js index 4ad2d52f2222..69a378522323 100644 --- a/packages/jest-editor-support/src/__tests__/Settings-test.js +++ b/packages/jest-editor-support/src/__tests__/settings.test.js @@ -9,8 +9,8 @@ 'use strict'; const {EventEmitter} = require('events'); -const ProjectWorkspace = require('../ProjectWorkspace'); -const Settings = require('../Settings'); +const ProjectWorkspace = require('../project_workspace'); +const Settings = require('../settings'); describe('Settings', () => { it('sets itself up fom the constructor', () => { diff --git a/packages/jest-editor-support/src/__tests__/TestReconciler-test.js b/packages/jest-editor-support/src/__tests__/test_reconciler.test.js similarity index 98% rename from packages/jest-editor-support/src/__tests__/TestReconciler-test.js rename to packages/jest-editor-support/src/__tests__/test_reconciler.test.js index 21bb90f6e3d8..1eabfa6b336e 100644 --- a/packages/jest-editor-support/src/__tests__/TestReconciler-test.js +++ b/packages/jest-editor-support/src/__tests__/test_reconciler.test.js @@ -8,7 +8,7 @@ const fs = require('fs'); const path = require('path'); -const TestReconciler = require('../TestReconciler'); +const TestReconciler = require('../test_reconciler'); const fixtures = path.resolve(__dirname, '../../../../fixtures'); const reconcilerWithFile = (file: string): TestReconciler => { diff --git a/packages/jest-editor-support/src/index.js b/packages/jest-editor-support/src/index.js index d17e7137e03d..2adab1c6c261 100644 --- a/packages/jest-editor-support/src/index.js +++ b/packages/jest-editor-support/src/index.js @@ -8,14 +8,14 @@ * @flow */ -import Process from './Process'; +import Process from './process'; -import ProjectWorkspace from './ProjectWorkspace'; -import Runner from './Runner'; -import Settings from './Settings'; -import {Expect, ItBlock, Node} from './parsers/ParserNodes'; -import {parse} from './parsers/BabylonParser'; -import TestReconciler from './TestReconciler'; +import ProjectWorkspace from './project_workspace'; +import Runner from './runner'; +import Settings from './settings'; +import {Expect, ItBlock, Node} from './parsers/parser_nodes'; +import {parse} from './parsers/babylon_parser'; +import TestReconciler from './test_reconciler'; module.exports = { Expect, diff --git a/packages/jest-editor-support/src/parsers/BabylonParser.js b/packages/jest-editor-support/src/parsers/babylon_parser.js similarity index 99% rename from packages/jest-editor-support/src/parsers/BabylonParser.js rename to packages/jest-editor-support/src/parsers/babylon_parser.js index 75c921beb607..c25f4f6403ca 100644 --- a/packages/jest-editor-support/src/parsers/BabylonParser.js +++ b/packages/jest-editor-support/src/parsers/babylon_parser.js @@ -11,7 +11,7 @@ import {readFileSync} from 'fs'; import {parse as babylonParse} from 'babylon'; -import {Expect, ItBlock} from './ParserNodes'; +import {Expect, ItBlock} from './parser_nodes'; export type BabylonParserResult = { expects: Array, diff --git a/packages/jest-editor-support/src/parsers/ParserNodes.js b/packages/jest-editor-support/src/parsers/parser_nodes.js similarity index 100% rename from packages/jest-editor-support/src/parsers/ParserNodes.js rename to packages/jest-editor-support/src/parsers/parser_nodes.js diff --git a/packages/jest-editor-support/src/Process.js b/packages/jest-editor-support/src/process.js similarity index 96% rename from packages/jest-editor-support/src/Process.js rename to packages/jest-editor-support/src/process.js index 5e75f47d6424..e3c057e903af 100644 --- a/packages/jest-editor-support/src/Process.js +++ b/packages/jest-editor-support/src/process.js @@ -10,7 +10,7 @@ import {ChildProcess, spawn} from 'child_process'; -import ProjectWorkspace from './ProjectWorkspace'; +import ProjectWorkspace from './project_workspace'; /** * Spawns and returns a Jest process with specific args diff --git a/packages/jest-editor-support/src/ProjectWorkspace.js b/packages/jest-editor-support/src/project_workspace.js similarity index 100% rename from packages/jest-editor-support/src/ProjectWorkspace.js rename to packages/jest-editor-support/src/project_workspace.js diff --git a/packages/jest-editor-support/src/Runner.js b/packages/jest-editor-support/src/runner.js similarity index 97% rename from packages/jest-editor-support/src/Runner.js rename to packages/jest-editor-support/src/runner.js index 4643b94fd0a2..a53d5219c910 100644 --- a/packages/jest-editor-support/src/Runner.js +++ b/packages/jest-editor-support/src/runner.js @@ -14,8 +14,8 @@ import {ChildProcess, spawn} from 'child_process'; import {readFile} from 'fs'; import {tmpdir} from 'os'; import EventEmitter from 'events'; -import ProjectWorkspace from './ProjectWorkspace'; -import {createProcess} from './Process'; +import ProjectWorkspace from './project_workspace'; +import {createProcess} from './process'; // This class represents the running process, and // passes out events when it understands what data is being diff --git a/packages/jest-editor-support/src/Settings.js b/packages/jest-editor-support/src/settings.js similarity index 96% rename from packages/jest-editor-support/src/Settings.js rename to packages/jest-editor-support/src/settings.js index 9f7eda88c31d..79ef2b3bc75d 100644 --- a/packages/jest-editor-support/src/Settings.js +++ b/packages/jest-editor-support/src/settings.js @@ -12,8 +12,8 @@ import type {Options} from './types'; import {ChildProcess} from 'child_process'; import EventEmitter from 'events'; -import ProjectWorkspace from './ProjectWorkspace'; -import {createProcess} from './Process'; +import ProjectWorkspace from './project_workspace'; +import {createProcess} from './process'; // This class represents the the configuration of Jest's process // we want to start with the defaults then override whatever they output diff --git a/packages/jest-editor-support/src/TestReconciler.js b/packages/jest-editor-support/src/test_reconciler.js similarity index 100% rename from packages/jest-editor-support/src/TestReconciler.js rename to packages/jest-editor-support/src/test_reconciler.js diff --git a/packages/jest-editor-support/src/types.js b/packages/jest-editor-support/src/types.js index 7ce478e7c911..ea92ce9f7397 100644 --- a/packages/jest-editor-support/src/types.js +++ b/packages/jest-editor-support/src/types.js @@ -14,7 +14,7 @@ export type Location = { }; import type {ChildProcess} from 'child_process'; -import type ProjectWorkspace from './ProjectWorkspace'; +import type ProjectWorkspace from './project_workspace'; export type Options = { createProcess?: ( diff --git a/packages/jest-environment-node/src/__tests__/NodeEnvironment-test.js b/packages/jest-environment-node/src/__tests__/node_environment.test.js similarity index 100% rename from packages/jest-environment-node/src/__tests__/NodeEnvironment-test.js rename to packages/jest-environment-node/src/__tests__/node_environment.test.js diff --git a/packages/jest-get-type/src/__tests__/index-test.js b/packages/jest-get-type/src/__tests__/index.test.js similarity index 100% rename from packages/jest-get-type/src/__tests__/index-test.js rename to packages/jest-get-type/src/__tests__/index.test.js diff --git a/packages/jest-haste-map/src/__tests__/__snapshots__/index-test.js.snap b/packages/jest-haste-map/src/__tests__/__snapshots__/index.test.js.snap similarity index 100% rename from packages/jest-haste-map/src/__tests__/__snapshots__/index-test.js.snap rename to packages/jest-haste-map/src/__tests__/__snapshots__/index.test.js.snap diff --git a/packages/jest-haste-map/src/__tests__/getMockName-test.js b/packages/jest-haste-map/src/__tests__/get_mock_name.test.js similarity index 92% rename from packages/jest-haste-map/src/__tests__/getMockName-test.js rename to packages/jest-haste-map/src/__tests__/get_mock_name.test.js index 51d31a067066..ac008008e566 100644 --- a/packages/jest-haste-map/src/__tests__/getMockName-test.js +++ b/packages/jest-haste-map/src/__tests__/get_mock_name.test.js @@ -9,7 +9,7 @@ 'use strict'; const path = require('path'); -const getMockName = require('../getMockName'); +const getMockName = require('../get_mock_name'); describe('getMockName', () => { it('extracts mock name from file path', () => { diff --git a/packages/jest-haste-map/src/__tests__/index-test.js b/packages/jest-haste-map/src/__tests__/index.test.js similarity index 100% rename from packages/jest-haste-map/src/__tests__/index-test.js rename to packages/jest-haste-map/src/__tests__/index.test.js diff --git a/packages/jest-haste-map/src/__tests__/worker-test.js b/packages/jest-haste-map/src/__tests__/worker.test.js similarity index 100% rename from packages/jest-haste-map/src/__tests__/worker-test.js rename to packages/jest-haste-map/src/__tests__/worker.test.js diff --git a/packages/jest-haste-map/src/crawlers/__tests__/node-test.js b/packages/jest-haste-map/src/crawlers/__tests__/node.test.js similarity index 100% rename from packages/jest-haste-map/src/crawlers/__tests__/node-test.js rename to packages/jest-haste-map/src/crawlers/__tests__/node.test.js diff --git a/packages/jest-haste-map/src/crawlers/__tests__/watchman-test.js b/packages/jest-haste-map/src/crawlers/__tests__/watchman.test.js similarity index 100% rename from packages/jest-haste-map/src/crawlers/__tests__/watchman-test.js rename to packages/jest-haste-map/src/crawlers/__tests__/watchman.test.js diff --git a/packages/jest-haste-map/src/getMockName.js b/packages/jest-haste-map/src/get_mock_name.js similarity index 100% rename from packages/jest-haste-map/src/getMockName.js rename to packages/jest-haste-map/src/get_mock_name.js diff --git a/packages/jest-haste-map/src/HasteFS.js b/packages/jest-haste-map/src/haste_fs.js similarity index 100% rename from packages/jest-haste-map/src/HasteFS.js rename to packages/jest-haste-map/src/haste_fs.js diff --git a/packages/jest-haste-map/src/index.js b/packages/jest-haste-map/src/index.js index f1d189c4a2b4..77ef019a5652 100644 --- a/packages/jest-haste-map/src/index.js +++ b/packages/jest-haste-map/src/index.js @@ -33,10 +33,10 @@ import workerFarm from 'worker-farm'; import {version as VERSION} from '../package.json'; // eslint-disable-next-line import/no-duplicates import H from './constants'; -import HasteFS from './HasteFS'; -import HasteModuleMap from './ModuleMap'; -import getMockName from './getMockName'; -import getPlatformExtension from './lib/getPlatformExtension'; +import HasteFS from './haste_fs'; +import HasteModuleMap from './module_map'; +import getMockName from './get_mock_name'; +import getPlatformExtension from './lib/get_platform_extension'; import nodeCrawl from './crawlers/node'; import watchmanCrawl from './crawlers/watchman'; import worker from './worker'; diff --git a/packages/jest-haste-map/src/lib/__tests__/extractRequires-test.js b/packages/jest-haste-map/src/lib/__tests__/extract_requires.test.js similarity index 97% rename from packages/jest-haste-map/src/lib/__tests__/extractRequires-test.js rename to packages/jest-haste-map/src/lib/__tests__/extract_requires.test.js index bcc103a21dcf..fb470813bde5 100644 --- a/packages/jest-haste-map/src/lib/__tests__/extractRequires-test.js +++ b/packages/jest-haste-map/src/lib/__tests__/extract_requires.test.js @@ -10,7 +10,7 @@ */ 'use strict'; -const extractRequires = require('../extractRequires'); +const extractRequires = require('../extract_requires'); describe('extractRequires', () => { it('extracts both requires and imports from code', () => { diff --git a/packages/jest-haste-map/src/lib/__tests__/getPlatformExtension-test.js b/packages/jest-haste-map/src/lib/__tests__/get_platform_extension.test.js similarity index 93% rename from packages/jest-haste-map/src/lib/__tests__/getPlatformExtension-test.js rename to packages/jest-haste-map/src/lib/__tests__/get_platform_extension.test.js index 15ddc5c062db..e300392ecf8b 100644 --- a/packages/jest-haste-map/src/lib/__tests__/getPlatformExtension-test.js +++ b/packages/jest-haste-map/src/lib/__tests__/get_platform_extension.test.js @@ -14,7 +14,7 @@ let getPlatformExtension; describe('getPlatformExtension', () => { beforeEach(() => { - getPlatformExtension = require('../getPlatformExtension'); + getPlatformExtension = require('../get_platform_extension'); }); it('should get platform ext', () => { diff --git a/packages/jest-haste-map/src/lib/extractRequires.js b/packages/jest-haste-map/src/lib/extract_requires.js similarity index 100% rename from packages/jest-haste-map/src/lib/extractRequires.js rename to packages/jest-haste-map/src/lib/extract_requires.js diff --git a/packages/jest-haste-map/src/lib/getPlatformExtension.js b/packages/jest-haste-map/src/lib/get_platform_extension.js similarity index 100% rename from packages/jest-haste-map/src/lib/getPlatformExtension.js rename to packages/jest-haste-map/src/lib/get_platform_extension.js diff --git a/packages/jest-haste-map/src/ModuleMap.js b/packages/jest-haste-map/src/module_map.js similarity index 100% rename from packages/jest-haste-map/src/ModuleMap.js rename to packages/jest-haste-map/src/module_map.js diff --git a/packages/jest-haste-map/src/worker.js b/packages/jest-haste-map/src/worker.js index 9cc6c55e8bc6..9bf52cb3968f 100644 --- a/packages/jest-haste-map/src/worker.js +++ b/packages/jest-haste-map/src/worker.js @@ -15,7 +15,7 @@ import path from 'path'; import docblock from 'jest-docblock'; import fs from 'graceful-fs'; import H from './constants'; -import extractRequires from './lib/extractRequires'; +import extractRequires from './lib/extract_requires'; const JSON_EXTENSION = '.json'; const PACKAGE_JSON = path.sep + 'package' + JSON_EXTENSION; diff --git a/packages/jest-jasmine2/src/__tests__/__snapshots__/expectationResultFactory-test.js.snap b/packages/jest-jasmine2/src/__tests__/__snapshots__/expectation_result_factory.test.js.snap similarity index 100% rename from packages/jest-jasmine2/src/__tests__/__snapshots__/expectationResultFactory-test.js.snap rename to packages/jest-jasmine2/src/__tests__/__snapshots__/expectation_result_factory.test.js.snap diff --git a/packages/jest-jasmine2/src/__tests__/__snapshots__/matchers-test.js.snap b/packages/jest-jasmine2/src/__tests__/__snapshots__/matchers.test.js.snap similarity index 100% rename from packages/jest-jasmine2/src/__tests__/__snapshots__/matchers-test.js.snap rename to packages/jest-jasmine2/src/__tests__/__snapshots__/matchers.test.js.snap diff --git a/packages/jest-jasmine2/src/__tests__/expectationResultFactory-test.js b/packages/jest-jasmine2/src/__tests__/expectation_result_factory.test.js similarity index 96% rename from packages/jest-jasmine2/src/__tests__/expectationResultFactory-test.js rename to packages/jest-jasmine2/src/__tests__/expectation_result_factory.test.js index 30f1ac811579..5e731da5584d 100644 --- a/packages/jest-jasmine2/src/__tests__/expectationResultFactory-test.js +++ b/packages/jest-jasmine2/src/__tests__/expectation_result_factory.test.js @@ -9,7 +9,7 @@ */ 'use strict'; -const expectationResultFactory = require('../expectationResultFactory'); +const expectationResultFactory = require('../expectation_result_factory'); describe('expectationResultFactory', () => { it('returns the result if passed.', () => { diff --git a/packages/jest-jasmine2/src/__tests__/it_to_test_alias-test.js b/packages/jest-jasmine2/src/__tests__/it_to_test_alias.test.js similarity index 100% rename from packages/jest-jasmine2/src/__tests__/it_to_test_alias-test.js rename to packages/jest-jasmine2/src/__tests__/it_to_test_alias.test.js diff --git a/packages/jest-jasmine2/src/__tests__/iterators-test.js b/packages/jest-jasmine2/src/__tests__/iterators.test.js similarity index 100% rename from packages/jest-jasmine2/src/__tests__/iterators-test.js rename to packages/jest-jasmine2/src/__tests__/iterators.test.js diff --git a/packages/jest-jasmine2/src/__tests__/matchers-test.js b/packages/jest-jasmine2/src/__tests__/matchers.test.js similarity index 100% rename from packages/jest-jasmine2/src/__tests__/matchers-test.js rename to packages/jest-jasmine2/src/__tests__/matchers.test.js diff --git a/packages/jest-jasmine2/src/__tests__/p-timeout-test.js b/packages/jest-jasmine2/src/__tests__/p_timeout.test.js similarity index 97% rename from packages/jest-jasmine2/src/__tests__/p-timeout-test.js rename to packages/jest-jasmine2/src/__tests__/p_timeout.test.js index 28da9dcc50be..e61fa97bbe85 100644 --- a/packages/jest-jasmine2/src/__tests__/p-timeout-test.js +++ b/packages/jest-jasmine2/src/__tests__/p_timeout.test.js @@ -11,7 +11,7 @@ jest.useFakeTimers(); -const pTimeout = require('../p-timeout'); +const pTimeout = require('../p_timeout'); describe('pTimeout', () => { it('calls `clearTimeout` and resolves when `promise` resolves.', async () => { diff --git a/packages/jest-jasmine2/src/__tests__/queueRunner-test.js b/packages/jest-jasmine2/src/__tests__/queue_runner.test.js similarity index 98% rename from packages/jest-jasmine2/src/__tests__/queueRunner-test.js rename to packages/jest-jasmine2/src/__tests__/queue_runner.test.js index dbedb86e239f..5c7758a8adda 100644 --- a/packages/jest-jasmine2/src/__tests__/queueRunner-test.js +++ b/packages/jest-jasmine2/src/__tests__/queue_runner.test.js @@ -9,7 +9,7 @@ */ 'use strict'; -const queueRunner = require('../queueRunner'); +const queueRunner = require('../queue_runner'); describe('queueRunner', () => { it('runs every function in the queue.', async () => { diff --git a/packages/jest-jasmine2/src/__tests__/reporter-test.js b/packages/jest-jasmine2/src/__tests__/reporter.test.js similarity index 100% rename from packages/jest-jasmine2/src/__tests__/reporter-test.js rename to packages/jest-jasmine2/src/__tests__/reporter.test.js diff --git a/packages/jest-jasmine2/src/assert-support.js b/packages/jest-jasmine2/src/assert_support.js similarity index 98% rename from packages/jest-jasmine2/src/assert-support.js rename to packages/jest-jasmine2/src/assert_support.js index 342acc751bd5..ba45a338e533 100644 --- a/packages/jest-jasmine2/src/assert-support.js +++ b/packages/jest-jasmine2/src/assert_support.js @@ -8,7 +8,7 @@ * @flow */ -import type {DiffOptions} from 'jest-diff/src/diffStrings'; +import type {DiffOptions} from 'jest-diff/src/diff_strings'; import {printReceived, printExpected} from 'jest-matcher-utils'; import chalk from 'chalk'; diff --git a/packages/jest-jasmine2/src/ExpectationFailed.js b/packages/jest-jasmine2/src/expectation_failed.js similarity index 100% rename from packages/jest-jasmine2/src/ExpectationFailed.js rename to packages/jest-jasmine2/src/expectation_failed.js diff --git a/packages/jest-jasmine2/src/expectationResultFactory.js b/packages/jest-jasmine2/src/expectation_result_factory.js similarity index 100% rename from packages/jest-jasmine2/src/expectationResultFactory.js rename to packages/jest-jasmine2/src/expectation_result_factory.js diff --git a/packages/jest-jasmine2/src/index.js b/packages/jest-jasmine2/src/index.js index 3bc83cc60045..642492817351 100644 --- a/packages/jest-jasmine2/src/index.js +++ b/packages/jest-jasmine2/src/index.js @@ -16,9 +16,9 @@ import type Runtime from 'jest-runtime'; import path from 'path'; import JasmineReporter from './reporter'; -import jasmineAsync from './jasmine-async'; +import jasmineAsync from './jasmine_async'; -const JASMINE = require.resolve('./jasmine/jasmine-light.js'); +const JASMINE = require.resolve('./jasmine/jasmine_light.js'); async function jasmine2( globalConfig: GlobalConfig, @@ -74,12 +74,12 @@ async function jasmine2( env.addReporter(reporter); - runtime.requireInternalModule(path.resolve(__dirname, './jest-expect.js'))({ + runtime.requireInternalModule(path.resolve(__dirname, './jest_expect.js'))({ expand: globalConfig.expand, }); const snapshotState: SnapshotState = runtime.requireInternalModule( - path.resolve(__dirname, './setup-jest-globals.js'), + path.resolve(__dirname, './setup_jest_globals.js'), )({ config, globalConfig, diff --git a/packages/jest-jasmine2/src/jasmine/CallTracker.js b/packages/jest-jasmine2/src/jasmine/call_tracker.js similarity index 100% rename from packages/jest-jasmine2/src/jasmine/CallTracker.js rename to packages/jest-jasmine2/src/jasmine/call_tracker.js diff --git a/packages/jest-jasmine2/src/jasmine/createSpy.js b/packages/jest-jasmine2/src/jasmine/create_spy.js similarity index 96% rename from packages/jest-jasmine2/src/jasmine/createSpy.js rename to packages/jest-jasmine2/src/jasmine/create_spy.js index 8af4ed56bc06..d3f93ad8e2d2 100644 --- a/packages/jest-jasmine2/src/jasmine/createSpy.js +++ b/packages/jest-jasmine2/src/jasmine/create_spy.js @@ -31,9 +31,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* eslint-disable sort-keys */ -import CallTracker from './CallTracker'; +import CallTracker from './call_tracker'; -import SpyStrategy from './SpyStrategy'; +import SpyStrategy from './spy_strategy'; function createSpy(name, originalFn) { const spyStrategy = new SpyStrategy({ diff --git a/packages/jest-jasmine2/src/jasmine/Env.js b/packages/jest-jasmine2/src/jasmine/env.js similarity index 99% rename from packages/jest-jasmine2/src/jasmine/Env.js rename to packages/jest-jasmine2/src/jasmine/env.js index 3abd06e18195..2a0ad062806e 100644 --- a/packages/jest-jasmine2/src/jasmine/Env.js +++ b/packages/jest-jasmine2/src/jasmine/env.js @@ -31,9 +31,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* eslint-disable sort-keys */ -import queueRunner from '../queueRunner'; +import queueRunner from '../queue_runner'; -import treeProcessor from '../treeProcessor'; +import treeProcessor from '../tree_processor'; module.exports = function(j$) { function Env(options) { diff --git a/packages/jest-jasmine2/src/jasmine/jasmine-light.js b/packages/jest-jasmine2/src/jasmine/jasmine_light.js similarity index 92% rename from packages/jest-jasmine2/src/jasmine/jasmine-light.js rename to packages/jest-jasmine2/src/jasmine/jasmine_light.js index abb2f7cb5f11..5f7142d77490 100644 --- a/packages/jest-jasmine2/src/jasmine/jasmine-light.js +++ b/packages/jest-jasmine2/src/jasmine/jasmine_light.js @@ -34,14 +34,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import type {Jasmine} from 'types/Jasmine'; -import createSpy from './createSpy'; -import Env from './Env'; -import JsApiReporter from './JsApiReporter'; -import ReportDispatcher from './ReportDispatcher'; -import Spec from './Spec'; -import SpyRegistry from './SpyRegistry'; -import Suite from './Suite'; -import Timer from './Timer'; +import createSpy from './create_spy'; +import Env from './env'; +import JsApiReporter from './js_api_reporter'; +import ReportDispatcher from './report_dispatcher'; +import Spec from './spec'; +import SpyRegistry from './spy_registry'; +import Suite from './suite'; +import Timer from './timer'; exports.create = function() { const j$ = {}; diff --git a/packages/jest-jasmine2/src/jasmine/JsApiReporter.js b/packages/jest-jasmine2/src/jasmine/js_api_reporter.js similarity index 100% rename from packages/jest-jasmine2/src/jasmine/JsApiReporter.js rename to packages/jest-jasmine2/src/jasmine/js_api_reporter.js diff --git a/packages/jest-jasmine2/src/jasmine/ReportDispatcher.js b/packages/jest-jasmine2/src/jasmine/report_dispatcher.js similarity index 100% rename from packages/jest-jasmine2/src/jasmine/ReportDispatcher.js rename to packages/jest-jasmine2/src/jasmine/report_dispatcher.js diff --git a/packages/jest-jasmine2/src/jasmine/Spec.js b/packages/jest-jasmine2/src/jasmine/spec.js similarity index 96% rename from packages/jest-jasmine2/src/jasmine/Spec.js rename to packages/jest-jasmine2/src/jasmine/spec.js index b8a36726d5e8..c74218c2450b 100644 --- a/packages/jest-jasmine2/src/jasmine/Spec.js +++ b/packages/jest-jasmine2/src/jasmine/spec.js @@ -32,9 +32,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* @flow */ /* eslint-disable sort-keys */ -import ExpectationFailed from '../ExpectationFailed'; +import ExpectationFailed from '../expectation_failed'; -import expectationResultFactory from '../expectationResultFactory'; +import expectationResultFactory from '../expectation_result_factory'; function Spec(attrs: Object) { this.resultCallback = attrs.resultCallback || function() {}; @@ -125,7 +125,7 @@ Spec.prototype.onException = function onException(error) { } if (error instanceof require('assert').AssertionError) { - const assertionErrorMessage = require('../assert-support'); + const assertionErrorMessage = require('../assert_support'); error = assertionErrorMessage(error, {expand: this.expand}); } diff --git a/packages/jest-jasmine2/src/jasmine/SpyRegistry.js b/packages/jest-jasmine2/src/jasmine/spy_registry.js similarity index 97% rename from packages/jest-jasmine2/src/jasmine/SpyRegistry.js rename to packages/jest-jasmine2/src/jasmine/spy_registry.js index 7667f68b2c48..5d588079b8d2 100644 --- a/packages/jest-jasmine2/src/jasmine/SpyRegistry.js +++ b/packages/jest-jasmine2/src/jasmine/spy_registry.js @@ -31,10 +31,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* @flow */ -import CallTracker from './CallTracker'; +import CallTracker from './call_tracker'; -import createSpy from './createSpy'; -import SpyStrategy from './SpyStrategy'; +import createSpy from './create_spy'; +import SpyStrategy from './spy_strategy'; const formatErrorMsg = (domain: string, usage?: string) => { const usageDefinition = usage ? '\nUsage: ' + usage : ''; diff --git a/packages/jest-jasmine2/src/jasmine/SpyStrategy.js b/packages/jest-jasmine2/src/jasmine/spy_strategy.js similarity index 100% rename from packages/jest-jasmine2/src/jasmine/SpyStrategy.js rename to packages/jest-jasmine2/src/jasmine/spy_strategy.js diff --git a/packages/jest-jasmine2/src/jasmine/Suite.js b/packages/jest-jasmine2/src/jasmine/suite.js similarity index 97% rename from packages/jest-jasmine2/src/jasmine/Suite.js rename to packages/jest-jasmine2/src/jasmine/suite.js index 83449e3573cf..8d511602c58a 100644 --- a/packages/jest-jasmine2/src/jasmine/Suite.js +++ b/packages/jest-jasmine2/src/jasmine/suite.js @@ -32,9 +32,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* @flow */ /* eslint-disable sort-keys */ -import ExpectationFailed from '../ExpectationFailed'; +import ExpectationFailed from '../expectation_failed'; -import expectationResultFactory from '../expectationResultFactory'; +import expectationResultFactory from '../expectation_result_factory'; function Suite(attrs: Object) { this.id = attrs.id; diff --git a/packages/jest-jasmine2/src/jasmine/Timer.js b/packages/jest-jasmine2/src/jasmine/timer.js similarity index 100% rename from packages/jest-jasmine2/src/jasmine/Timer.js rename to packages/jest-jasmine2/src/jasmine/timer.js diff --git a/packages/jest-jasmine2/src/jasmine-async.js b/packages/jest-jasmine2/src/jasmine_async.js similarity index 100% rename from packages/jest-jasmine2/src/jasmine-async.js rename to packages/jest-jasmine2/src/jasmine_async.js diff --git a/packages/jest-jasmine2/src/jest-expect.js b/packages/jest-jasmine2/src/jest_expect.js similarity index 100% rename from packages/jest-jasmine2/src/jest-expect.js rename to packages/jest-jasmine2/src/jest_expect.js diff --git a/packages/jest-jasmine2/src/p-timeout.js b/packages/jest-jasmine2/src/p_timeout.js similarity index 100% rename from packages/jest-jasmine2/src/p-timeout.js rename to packages/jest-jasmine2/src/p_timeout.js diff --git a/packages/jest-jasmine2/src/queueRunner.js b/packages/jest-jasmine2/src/queue_runner.js similarity index 97% rename from packages/jest-jasmine2/src/queueRunner.js rename to packages/jest-jasmine2/src/queue_runner.js index 893389bb3b9e..57309120300a 100644 --- a/packages/jest-jasmine2/src/queueRunner.js +++ b/packages/jest-jasmine2/src/queue_runner.js @@ -8,7 +8,7 @@ * @flow */ -import pTimeout from './p-timeout'; +import pTimeout from './p_timeout'; type Options = { clearTimeout: (timeoutID: number) => void, diff --git a/packages/jest-jasmine2/src/setup-jest-globals.js b/packages/jest-jasmine2/src/setup_jest_globals.js similarity index 100% rename from packages/jest-jasmine2/src/setup-jest-globals.js rename to packages/jest-jasmine2/src/setup_jest_globals.js diff --git a/packages/jest-jasmine2/src/treeProcessor.js b/packages/jest-jasmine2/src/tree_processor.js similarity index 100% rename from packages/jest-jasmine2/src/treeProcessor.js rename to packages/jest-jasmine2/src/tree_processor.js diff --git a/packages/jest-matcher-utils/src/__tests__/__snapshots__/index-test.js.snap b/packages/jest-matcher-utils/src/__tests__/__snapshots__/index.test.js.snap similarity index 100% rename from packages/jest-matcher-utils/src/__tests__/__snapshots__/index-test.js.snap rename to packages/jest-matcher-utils/src/__tests__/__snapshots__/index.test.js.snap diff --git a/packages/jest-matcher-utils/src/__tests__/index-test.js b/packages/jest-matcher-utils/src/__tests__/index.test.js similarity index 100% rename from packages/jest-matcher-utils/src/__tests__/index-test.js rename to packages/jest-matcher-utils/src/__tests__/index.test.js diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/extend-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/extend.test.js.snap similarity index 100% rename from packages/jest-matchers/src/__tests__/__snapshots__/extend-test.js.snap rename to packages/jest-matchers/src/__tests__/__snapshots__/extend.test.js.snap diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/matchers-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/matchers.test.js.snap similarity index 100% rename from packages/jest-matchers/src/__tests__/__snapshots__/matchers-test.js.snap rename to packages/jest-matchers/src/__tests__/__snapshots__/matchers.test.js.snap diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/spyMatchers-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/spy_matchers.test.js.snap similarity index 100% rename from packages/jest-matchers/src/__tests__/__snapshots__/spyMatchers-test.js.snap rename to packages/jest-matchers/src/__tests__/__snapshots__/spy_matchers.test.js.snap diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/toThrowMatchers-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/to_throw_matchers.test.js.snap similarity index 100% rename from packages/jest-matchers/src/__tests__/__snapshots__/toThrowMatchers-test.js.snap rename to packages/jest-matchers/src/__tests__/__snapshots__/to_throw_matchers.test.js.snap diff --git a/packages/jest-matchers/src/__tests__/assertion-counts-test.js b/packages/jest-matchers/src/__tests__/assertion_counts.test.js similarity index 100% rename from packages/jest-matchers/src/__tests__/assertion-counts-test.js rename to packages/jest-matchers/src/__tests__/assertion_counts.test.js diff --git a/packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js b/packages/jest-matchers/src/__tests__/asymmetric_matchers.test.js similarity index 99% rename from packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js rename to packages/jest-matchers/src/__tests__/asymmetric_matchers.test.js index b189a99b224d..7e2d046b716f 100644 --- a/packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js +++ b/packages/jest-matchers/src/__tests__/asymmetric_matchers.test.js @@ -18,7 +18,7 @@ const { objectContaining, stringContaining, stringMatching, -} = require('../asymmetric-matchers'); +} = require('../asymmetric_matchers'); test('Any.asymmetricMatch()', () => { const Thing = function() {}; diff --git a/packages/jest-matchers/src/__tests__/extend-test.js b/packages/jest-matchers/src/__tests__/extend.test.js similarity index 97% rename from packages/jest-matchers/src/__tests__/extend-test.js rename to packages/jest-matchers/src/__tests__/extend.test.js index 32bc1186d09b..f864e693e3e9 100644 --- a/packages/jest-matchers/src/__tests__/extend-test.js +++ b/packages/jest-matchers/src/__tests__/extend.test.js @@ -9,7 +9,7 @@ */ const matcherUtils = require('jest-matcher-utils'); -const {equals} = require('../jasmine-utils'); +const {equals} = require('../jasmine_utils'); const jestExpect = require('../'); jestExpect.extend({ diff --git a/packages/jest-matchers/src/__tests__/matchers-test.js b/packages/jest-matchers/src/__tests__/matchers.test.js similarity index 100% rename from packages/jest-matchers/src/__tests__/matchers-test.js rename to packages/jest-matchers/src/__tests__/matchers.test.js diff --git a/packages/jest-matchers/src/__tests__/spyMatchers-test.js b/packages/jest-matchers/src/__tests__/spy_matchers.test.js similarity index 100% rename from packages/jest-matchers/src/__tests__/spyMatchers-test.js rename to packages/jest-matchers/src/__tests__/spy_matchers.test.js diff --git a/packages/jest-matchers/src/__tests__/symbol-in-objects-test.js b/packages/jest-matchers/src/__tests__/symbol_in_objects.test.js similarity index 100% rename from packages/jest-matchers/src/__tests__/symbol-in-objects-test.js rename to packages/jest-matchers/src/__tests__/symbol_in_objects.test.js diff --git a/packages/jest-matchers/src/__tests__/toThrowMatchers-test.js b/packages/jest-matchers/src/__tests__/to_throw_matchers.test.js similarity index 100% rename from packages/jest-matchers/src/__tests__/toThrowMatchers-test.js rename to packages/jest-matchers/src/__tests__/to_throw_matchers.test.js diff --git a/packages/jest-matchers/src/__tests__/utils-test.js b/packages/jest-matchers/src/__tests__/utils.test.js similarity index 100% rename from packages/jest-matchers/src/__tests__/utils-test.js rename to packages/jest-matchers/src/__tests__/utils.test.js diff --git a/packages/jest-matchers/src/asymmetric-matchers.js b/packages/jest-matchers/src/asymmetric_matchers.js similarity index 99% rename from packages/jest-matchers/src/asymmetric-matchers.js rename to packages/jest-matchers/src/asymmetric_matchers.js index e71f49ce0740..2f96075cf8f7 100644 --- a/packages/jest-matchers/src/asymmetric-matchers.js +++ b/packages/jest-matchers/src/asymmetric_matchers.js @@ -14,7 +14,7 @@ import { hasProperty, isA, isUndefined, -} from './jasmine-utils'; +} from './jasmine_utils'; class AsymmetricMatcher { $$typeof: Symbol; diff --git a/packages/jest-matchers/src/extractExpectedAssertionsErrors.js b/packages/jest-matchers/src/extract_expected_assertions_errors.js similarity index 97% rename from packages/jest-matchers/src/extractExpectedAssertionsErrors.js rename to packages/jest-matchers/src/extract_expected_assertions_errors.js index 01061e6f00ec..7584dbbc147f 100644 --- a/packages/jest-matchers/src/extractExpectedAssertionsErrors.js +++ b/packages/jest-matchers/src/extract_expected_assertions_errors.js @@ -15,7 +15,7 @@ import { pluralize, } from 'jest-matcher-utils'; -import {getState, setState} from './jest-matchers-object'; +import {getState, setState} from './jest_matchers_object'; // Create and format all errors related to the mismatched number of `expect` // calls and reset the matchers state. diff --git a/packages/jest-matchers/src/index.js b/packages/jest-matchers/src/index.js index 7f4f12f225f3..1ade4c63bb99 100644 --- a/packages/jest-matchers/src/index.js +++ b/packages/jest-matchers/src/index.js @@ -21,9 +21,9 @@ import type { import utils from 'jest-matcher-utils'; import matchers from './matchers'; -import spyMatchers from './spyMatchers'; -import toThrowMatchers from './toThrowMatchers'; -import {equals} from './jasmine-utils'; +import spyMatchers from './spy_matchers'; +import toThrowMatchers from './to_throw_matchers'; +import {equals} from './jasmine_utils'; import { any, anything, @@ -31,14 +31,15 @@ import { objectContaining, stringContaining, stringMatching, -} from './asymmetric-matchers'; +} from './asymmetric_matchers'; import { getState, setState, getMatchers, setMatchers, -} from './jest-matchers-object'; -import extractExpectedAssertionsErrors from './extractExpectedAssertionsErrors'; +} from './jest_matchers_object'; +import extractExpectedAssertionsErrors + from './extract_expected_assertions_errors'; class JestAssertionError extends Error { matcherResult: any; diff --git a/packages/jest-matchers/src/jasmine-utils.js b/packages/jest-matchers/src/jasmine_utils.js similarity index 100% rename from packages/jest-matchers/src/jasmine-utils.js rename to packages/jest-matchers/src/jasmine_utils.js diff --git a/packages/jest-matchers/src/jest-matchers-object.js b/packages/jest-matchers/src/jest_matchers_object.js similarity index 100% rename from packages/jest-matchers/src/jest-matchers-object.js rename to packages/jest-matchers/src/jest_matchers_object.js diff --git a/packages/jest-matchers/src/matchers.js b/packages/jest-matchers/src/matchers.js index 67c40656bfcb..4116c0e453ba 100644 --- a/packages/jest-matchers/src/matchers.js +++ b/packages/jest-matchers/src/matchers.js @@ -24,7 +24,7 @@ import { printWithType, } from 'jest-matcher-utils'; import {getObjectSubset, getPath, hasOwnProperty} from './utils'; -import {equals} from './jasmine-utils'; +import {equals} from './jasmine_utils'; type ContainIterable = | Array diff --git a/packages/jest-matchers/src/spyMatchers.js b/packages/jest-matchers/src/spy_matchers.js similarity index 99% rename from packages/jest-matchers/src/spyMatchers.js rename to packages/jest-matchers/src/spy_matchers.js index 035f79ce82bf..c1a68be217fc 100644 --- a/packages/jest-matchers/src/spyMatchers.js +++ b/packages/jest-matchers/src/spy_matchers.js @@ -23,7 +23,7 @@ import { printWithType, RECEIVED_COLOR, } from 'jest-matcher-utils'; -import {equals} from './jasmine-utils'; +import {equals} from './jasmine_utils'; const RECEIVED_NAME = { 'mock function': 'jest.fn()', diff --git a/packages/jest-matchers/src/toThrowMatchers.js b/packages/jest-matchers/src/to_throw_matchers.js similarity index 99% rename from packages/jest-matchers/src/toThrowMatchers.js rename to packages/jest-matchers/src/to_throw_matchers.js index 9673395b1332..8b074fb53b5e 100644 --- a/packages/jest-matchers/src/toThrowMatchers.js +++ b/packages/jest-matchers/src/to_throw_matchers.js @@ -21,7 +21,7 @@ import { printExpected, printWithType, } from 'jest-matcher-utils'; -import {equals} from './jasmine-utils'; +import {equals} from './jasmine_utils'; const createMatcher = matcherName => ( actual: Function, diff --git a/packages/jest-message-util/src/__tests__/__snapshots__/messages-test.js.snap b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.js.snap similarity index 100% rename from packages/jest-message-util/src/__tests__/__snapshots__/messages-test.js.snap rename to packages/jest-message-util/src/__tests__/__snapshots__/messages.test.js.snap diff --git a/packages/jest-message-util/src/__tests__/messages-test.js b/packages/jest-message-util/src/__tests__/messages.test.js similarity index 100% rename from packages/jest-message-util/src/__tests__/messages-test.js rename to packages/jest-message-util/src/__tests__/messages.test.js diff --git a/packages/jest-mock/src/__tests__/jest-mock-test.js b/packages/jest-mock/src/__tests__/jest_mock.test.js similarity index 100% rename from packages/jest-mock/src/__tests__/jest-mock-test.js rename to packages/jest-mock/src/__tests__/jest_mock.test.js diff --git a/packages/jest-repl/src/__tests__/jest-repl-test.js b/packages/jest-repl/src/__tests__/jest_repl.test.js similarity index 100% rename from packages/jest-repl/src/__tests__/jest-repl-test.js rename to packages/jest-repl/src/__tests__/jest_repl.test.js diff --git a/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/__snapshots__/related-test.js.snap b/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/__snapshots__/related.test.js.snap similarity index 100% rename from packages/jest-resolve-dependencies/src/__tests__/__fixtures__/__snapshots__/related-test.js.snap rename to packages/jest-resolve-dependencies/src/__tests__/__fixtures__/__snapshots__/related.test.js.snap diff --git a/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/file-test.js b/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/file.test.js similarity index 100% rename from packages/jest-resolve-dependencies/src/__tests__/__fixtures__/file-test.js rename to packages/jest-resolve-dependencies/src/__tests__/__fixtures__/file.test.js diff --git a/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/related-test.js b/packages/jest-resolve-dependencies/src/__tests__/__fixtures__/related.test.js similarity index 100% rename from packages/jest-resolve-dependencies/src/__tests__/__fixtures__/related-test.js rename to packages/jest-resolve-dependencies/src/__tests__/__fixtures__/related.test.js diff --git a/packages/jest-resolve-dependencies/src/__tests__/DependencyResolver-test.js b/packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.js similarity index 89% rename from packages/jest-resolve-dependencies/src/__tests__/DependencyResolver-test.js rename to packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.js index 72a34bccca19..692924bff6af 100644 --- a/packages/jest-resolve-dependencies/src/__tests__/DependencyResolver-test.js +++ b/packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.js @@ -18,7 +18,7 @@ let Runtime; let config; const cases = { fancyCondition: jest.fn(path => path.length > 10), - testRegex: jest.fn(path => /-test.js$/.test(path)), + testRegex: jest.fn(path => /.test.js$/.test(path)), }; const filter = path => { return Object.keys(cases).every(key => cases[key](path)); @@ -73,7 +73,7 @@ test('resolves inverse dependencies for existing path', () => { const resolved = dependencyResolver.resolveInverse(paths, filter); expect(resolved).toEqual([ expect.stringContaining( - path.join('__tests__', '__fixtures__', 'file-test.js'), + path.join('__tests__', '__fixtures__', 'file.test.js'), ), ]); }); @@ -81,16 +81,16 @@ test('resolves inverse dependencies for existing path', () => { test('resolves inverse dependencies from available snapshot', () => { const paths = new Set([ path.resolve(__dirname, '__fixtures__/file.js'), - path.resolve(__dirname, '__fixtures__/__snapshots__/related-test.js.snap'), + path.resolve(__dirname, '__fixtures__/__snapshots__/related.test.js.snap'), ]); const resolved = dependencyResolver.resolveInverse(paths, filter); expect(resolved).toEqual( expect.arrayContaining([ expect.stringContaining( - path.join('__tests__', '__fixtures__', 'file-test.js'), + path.join('__tests__', '__fixtures__', 'file.test.js'), ), expect.stringContaining( - path.join('__tests__', '__fixtures__', 'related-test.js'), + path.join('__tests__', '__fixtures__', 'related.test.js'), ), ]), ); diff --git a/packages/jest-resolve/src/__tests__/resolve-test.js b/packages/jest-resolve/src/__tests__/resolve.test.js similarity index 100% rename from packages/jest-resolve/src/__tests__/resolve-test.js rename to packages/jest-resolve/src/__tests__/resolve.test.js diff --git a/packages/jest-resolve/src/defaultResolver.js b/packages/jest-resolve/src/default_resolver.js similarity index 100% rename from packages/jest-resolve/src/defaultResolver.js rename to packages/jest-resolve/src/default_resolver.js diff --git a/packages/jest-resolve/src/index.js b/packages/jest-resolve/src/index.js index 45d232f1e1bd..0feb1008698d 100644 --- a/packages/jest-resolve/src/index.js +++ b/packages/jest-resolve/src/index.js @@ -15,7 +15,7 @@ import fs from 'fs'; import path from 'path'; import nodeModulesPaths from 'resolve/lib/node-modules-paths'; import isBuiltinModule from 'is-builtin-module'; -import defaultResolver from './defaultResolver.js'; +import defaultResolver from './default_resolver.js'; type ResolverConfig = {| browser?: boolean, diff --git a/packages/jest-runtime/src/__mocks__/createRuntime.js b/packages/jest-runtime/src/__mocks__/createRuntime.js index 5d665afbaa63..bd544fe94a1b 100644 --- a/packages/jest-runtime/src/__mocks__/createRuntime.js +++ b/packages/jest-runtime/src/__mocks__/createRuntime.js @@ -17,7 +17,7 @@ module.exports = function createRuntime(filename, config) { config = normalize( Object.assign( { - name: 'Runtime-' + filename.replace(/\W/, '-') + '-tests', + name: 'Runtime-' + filename.replace(/\W/, '-') + '.tests', rootDir: path.resolve(path.dirname(filename), 'test_root'), }, config, diff --git a/packages/jest-runtime/src/__tests__/__snapshots__/ScriptTransformer-test.js.snap b/packages/jest-runtime/src/__tests__/__snapshots__/script_transformer.test.js.snap similarity index 100% rename from packages/jest-runtime/src/__tests__/__snapshots__/ScriptTransformer-test.js.snap rename to packages/jest-runtime/src/__tests__/__snapshots__/script_transformer.test.js.snap diff --git a/packages/jest-runtime/src/__tests__/instrumentation-test.js b/packages/jest-runtime/src/__tests__/instrumentation.test.js similarity index 94% rename from packages/jest-runtime/src/__tests__/instrumentation-test.js rename to packages/jest-runtime/src/__tests__/instrumentation.test.js index f83fe5a8a5da..f779a69b948e 100644 --- a/packages/jest-runtime/src/__tests__/instrumentation-test.js +++ b/packages/jest-runtime/src/__tests__/instrumentation.test.js @@ -21,7 +21,7 @@ const FILE_PATH_TO_INSTRUMENT = path.resolve( it('instruments files', () => { const vm = require('vm'); - const ScriptTransformer = require('../ScriptTransformer'); + const ScriptTransformer = require('../script_transformer'); const config = { cache: false, cacheDirectory: os.tmpdir(), diff --git a/packages/jest-runtime/src/__tests__/Resolve-browser-test.js b/packages/jest-runtime/src/__tests__/resolve_browser.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Resolve-browser-test.js rename to packages/jest-runtime/src/__tests__/resolve_browser.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-cli-test.js b/packages/jest-runtime/src/__tests__/runtime_cli.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-cli-test.js rename to packages/jest-runtime/src/__tests__/runtime_cli.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-environment-test.js b/packages/jest-runtime/src/__tests__/runtime_environment.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-environment-test.js rename to packages/jest-runtime/src/__tests__/runtime_environment.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-genMockFromModule-test.js b/packages/jest-runtime/src/__tests__/runtime_gen_mock_from_module.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-genMockFromModule-test.js rename to packages/jest-runtime/src/__tests__/runtime_gen_mock_from_module.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-internalModule-test.js b/packages/jest-runtime/src/__tests__/runtime_internal_module.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-internalModule-test.js rename to packages/jest-runtime/src/__tests__/runtime_internal_module.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-jest-spyOn-test.js b/packages/jest-runtime/src/__tests__/runtime_jest_spy_on.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-jest-spyOn-test.js rename to packages/jest-runtime/src/__tests__/runtime_jest_spy_on.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-mock-test.js b/packages/jest-runtime/src/__tests__/runtime_mock.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-mock-test.js rename to packages/jest-runtime/src/__tests__/runtime_mock.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-moduleDirectories-test.js b/packages/jest-runtime/src/__tests__/runtime_module_directories.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-moduleDirectories-test.js rename to packages/jest-runtime/src/__tests__/runtime_module_directories.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-NODE_PATH-test.js b/packages/jest-runtime/src/__tests__/runtime_node_path.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-NODE_PATH-test.js rename to packages/jest-runtime/src/__tests__/runtime_node_path.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-requireMock-test.js b/packages/jest-runtime/src/__tests__/runtime_require_mock.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-requireMock-test.js rename to packages/jest-runtime/src/__tests__/runtime_require_mock.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-requireModule-test.js b/packages/jest-runtime/src/__tests__/runtime_require_module.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-requireModule-test.js rename to packages/jest-runtime/src/__tests__/runtime_require_module.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-requireModuleOrMock-test.js b/packages/jest-runtime/src/__tests__/runtime_require_module_or_mock.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-requireModuleOrMock-test.js rename to packages/jest-runtime/src/__tests__/runtime_require_module_or_mock.test.js diff --git a/packages/jest-runtime/src/__tests__/Runtime-requireModuleOrMock-transitive-deps-test.js b/packages/jest-runtime/src/__tests__/runtime_require_module_or_mock_transitive_deps.test.js similarity index 100% rename from packages/jest-runtime/src/__tests__/Runtime-requireModuleOrMock-transitive-deps-test.js rename to packages/jest-runtime/src/__tests__/runtime_require_module_or_mock_transitive_deps.test.js diff --git a/packages/jest-runtime/src/__tests__/ScriptTransformer-test.js b/packages/jest-runtime/src/__tests__/script_transformer.test.js similarity index 99% rename from packages/jest-runtime/src/__tests__/ScriptTransformer-test.js rename to packages/jest-runtime/src/__tests__/script_transformer.test.js index 661f6ea79b11..cc1971409f0e 100644 --- a/packages/jest-runtime/src/__tests__/ScriptTransformer-test.js +++ b/packages/jest-runtime/src/__tests__/script_transformer.test.js @@ -153,7 +153,7 @@ describe('ScriptTransformer', () => { transformIgnorePatterns: ['/node_modules/'], }; - ScriptTransformer = require('../ScriptTransformer'); + ScriptTransformer = require('../script_transformer'); }; beforeEach(reset); diff --git a/packages/jest-runtime/src/index.js b/packages/jest-runtime/src/index.js index e0024e0100e2..99c04ceb5eeb 100644 --- a/packages/jest-runtime/src/index.js +++ b/packages/jest-runtime/src/index.js @@ -23,8 +23,8 @@ import {createDirectory} from 'jest-util'; import {escapePathForRegex} from 'jest-regex-util'; import fs from 'graceful-fs'; import stripBOM from 'strip-bom'; -import ScriptTransformer from './ScriptTransformer'; -import shouldInstrument from './shouldInstrument'; +import ScriptTransformer from './script_transformer'; +import shouldInstrument from './should_instrument'; import cliArgs from './cli/args'; type Module = {| diff --git a/packages/jest-runtime/src/ScriptTransformer.js b/packages/jest-runtime/src/script_transformer.js similarity index 99% rename from packages/jest-runtime/src/ScriptTransformer.js rename to packages/jest-runtime/src/script_transformer.js index 51778164e7e9..221e87b4daa5 100644 --- a/packages/jest-runtime/src/ScriptTransformer.js +++ b/packages/jest-runtime/src/script_transformer.js @@ -28,7 +28,7 @@ import {getCacheFilePath} from 'jest-haste-map'; import stableStringify from 'json-stable-stringify'; import slash from 'slash'; import {version as VERSION} from '../package.json'; -import shouldInstrument from './shouldInstrument'; +import shouldInstrument from './should_instrument'; export type Options = {| collectCoverage: boolean, diff --git a/packages/jest-runtime/src/shouldInstrument.js b/packages/jest-runtime/src/should_instrument.js similarity index 97% rename from packages/jest-runtime/src/shouldInstrument.js rename to packages/jest-runtime/src/should_instrument.js index 102ada2b3f97..1a874e877e77 100644 --- a/packages/jest-runtime/src/shouldInstrument.js +++ b/packages/jest-runtime/src/should_instrument.js @@ -9,7 +9,7 @@ */ import type {Path, ProjectConfig} from 'types/Config'; -import type {Options} from './ScriptTransformer'; +import type {Options} from './script_transformer'; import path from 'path'; import {escapePathForRegex} from 'jest-regex-util'; diff --git a/packages/jest-snapshot/src/__tests__/matcher-test.js b/packages/jest-snapshot/src/__tests__/matcher.test.js similarity index 100% rename from packages/jest-snapshot/src/__tests__/matcher-test.js rename to packages/jest-snapshot/src/__tests__/matcher.test.js diff --git a/packages/jest-snapshot/src/__tests__/plugins-test.js b/packages/jest-snapshot/src/__tests__/plugins.test.js similarity index 100% rename from packages/jest-snapshot/src/__tests__/plugins-test.js rename to packages/jest-snapshot/src/__tests__/plugins.test.js diff --git a/packages/jest-snapshot/src/__tests__/utils-test.js b/packages/jest-snapshot/src/__tests__/utils.test.js similarity index 98% rename from packages/jest-snapshot/src/__tests__/utils-test.js rename to packages/jest-snapshot/src/__tests__/utils.test.js index bf2d87597885..1251ccd10629 100644 --- a/packages/jest-snapshot/src/__tests__/utils-test.js +++ b/packages/jest-snapshot/src/__tests__/utils.test.js @@ -50,8 +50,8 @@ test('testNameToKey', () => { }); test('getSnapshotPath()', () => { - expect(getSnapshotPath('/abc/cde/a-test.js')).toBe( - path.join('/abc', 'cde', '__snapshots__', 'a-test.js.snap'), + expect(getSnapshotPath('/abc/cde/a.test.js')).toBe( + path.join('/abc', 'cde', '__snapshots__', 'a.test.js.snap'), ); }); diff --git a/packages/jest-snapshot/src/index.js b/packages/jest-snapshot/src/index.js index 15863996e8ef..30021363a678 100644 --- a/packages/jest-snapshot/src/index.js +++ b/packages/jest-snapshot/src/index.js @@ -21,7 +21,7 @@ import { matcherHint, RECEIVED_COLOR, } from 'jest-matcher-utils'; -import SnapshotState from './State'; +import SnapshotState from './state'; import {addSerializer, getSerializers} from './plugins'; import {SNAPSHOT_EXTENSION} from './utils'; diff --git a/packages/jest-snapshot/src/State.js b/packages/jest-snapshot/src/state.js similarity index 100% rename from packages/jest-snapshot/src/State.js rename to packages/jest-snapshot/src/state.js diff --git a/packages/jest-test-typescript-parser/src/__tests__/TypeScriptParser-test.js b/packages/jest-test-typescript-parser/src/__tests__/type_script_parser.test.js similarity index 89% rename from packages/jest-test-typescript-parser/src/__tests__/TypeScriptParser-test.js rename to packages/jest-test-typescript-parser/src/__tests__/type_script_parser.test.js index 08bb5762f91c..1cfef59ce3fd 100644 --- a/packages/jest-test-typescript-parser/src/__tests__/TypeScriptParser-test.js +++ b/packages/jest-test-typescript-parser/src/__tests__/type_script_parser.test.js @@ -8,7 +8,7 @@ 'use strict'; -const {parse} = require('../TypeScriptParser'); +const {parse} = require('../type_script_parser'); const {parserTests} = require('../../../../fixtures/parserTests'); parserTests(parse); diff --git a/packages/jest-test-typescript-parser/src/index.js b/packages/jest-test-typescript-parser/src/index.js index b847a586df47..f8b0e729f237 100644 --- a/packages/jest-test-typescript-parser/src/index.js +++ b/packages/jest-test-typescript-parser/src/index.js @@ -9,7 +9,7 @@ */ import {parse as babylonParser, ItBlock, Expect} from 'jest-editor-support'; -import TypeScriptParser from './TypeScriptParser'; +import TypeScriptParser from './type_script_parser'; export type ParserReturn = { itBlocks: Array, diff --git a/packages/jest-test-typescript-parser/src/TypeScriptParser.js b/packages/jest-test-typescript-parser/src/type_script_parser.js similarity index 100% rename from packages/jest-test-typescript-parser/src/TypeScriptParser.js rename to packages/jest-test-typescript-parser/src/type_script_parser.js diff --git a/packages/jest-util/src/Console.js b/packages/jest-util/src/Console.js index b284a753d810..c1e729d8e1e1 100644 --- a/packages/jest-util/src/Console.js +++ b/packages/jest-util/src/Console.js @@ -13,7 +13,7 @@ import type {LogType, LogMessage} from 'types/Console'; import {format} from 'util'; import {Console} from 'console'; -import clearLine from './clearLine'; +import clearLine from './clear_line'; type Formatter = (type: LogType, message: LogMessage) => string; diff --git a/packages/jest-util/src/__tests__/__snapshots__/FakeTimers-test.js.snap b/packages/jest-util/src/__tests__/__snapshots__/fake_timers.test.js.snap similarity index 100% rename from packages/jest-util/src/__tests__/__snapshots__/FakeTimers-test.js.snap rename to packages/jest-util/src/__tests__/__snapshots__/fake_timers.test.js.snap diff --git a/packages/jest-util/src/__tests__/__snapshots__/validateCLIOptions-test.js.snap b/packages/jest-util/src/__tests__/__snapshots__/validate_cli_options.test.js.snap similarity index 100% rename from packages/jest-util/src/__tests__/__snapshots__/validateCLIOptions-test.js.snap rename to packages/jest-util/src/__tests__/__snapshots__/validate_cli_options.test.js.snap diff --git a/packages/jest-util/src/__tests__/FakeTimers-test.js b/packages/jest-util/src/__tests__/fake_timers.test.js similarity index 99% rename from packages/jest-util/src/__tests__/FakeTimers-test.js rename to packages/jest-util/src/__tests__/fake_timers.test.js index 84f6d539f923..210dfac4e556 100644 --- a/packages/jest-util/src/__tests__/FakeTimers-test.js +++ b/packages/jest-util/src/__tests__/fake_timers.test.js @@ -15,7 +15,7 @@ describe('FakeTimers', () => { let FakeTimers, moduleMocker; beforeEach(() => { - FakeTimers = require('../FakeTimers'); + FakeTimers = require('../fake_timers'); const mock = require('jest-mock'); const global = vm.runInNewContext('this'); moduleMocker = new mock.ModuleMocker(global); diff --git a/packages/jest-util/src/__tests__/validateCLIOptions-test.js b/packages/jest-util/src/__tests__/validate_cli_options.test.js similarity index 94% rename from packages/jest-util/src/__tests__/validateCLIOptions-test.js rename to packages/jest-util/src/__tests__/validate_cli_options.test.js index 30183f8a52f0..a36e01318d49 100644 --- a/packages/jest-util/src/__tests__/validateCLIOptions-test.js +++ b/packages/jest-util/src/__tests__/validate_cli_options.test.js @@ -9,7 +9,7 @@ 'use strict'; -const validateCLIOptions = require('../validateCLIOptions'); +const validateCLIOptions = require('../validate_cli_options'); test('validates yargs special options', () => { const options = ['$0', '_', 'help', 'h']; diff --git a/packages/jest-util/src/clearLine.js b/packages/jest-util/src/clear_line.js similarity index 100% rename from packages/jest-util/src/clearLine.js rename to packages/jest-util/src/clear_line.js diff --git a/packages/jest-util/src/FakeTimers.js b/packages/jest-util/src/fake_timers.js similarity index 99% rename from packages/jest-util/src/FakeTimers.js rename to packages/jest-util/src/fake_timers.js index 5c9144bc14a5..b0d47a59daa6 100644 --- a/packages/jest-util/src/FakeTimers.js +++ b/packages/jest-util/src/fake_timers.js @@ -13,7 +13,7 @@ import type {Global} from 'types/Global'; import type {ModuleMocker} from 'jest-mock'; import {formatStackTrace} from 'jest-message-util'; -import setGlobal from './setGlobal'; +import setGlobal from './set_global'; /** * We don't know the type of arguments for a callback ahead of time which is why diff --git a/packages/jest-util/src/formatTestResults.js b/packages/jest-util/src/format_test_results.js similarity index 100% rename from packages/jest-util/src/formatTestResults.js rename to packages/jest-util/src/format_test_results.js diff --git a/packages/jest-util/src/index.js b/packages/jest-util/src/index.js index ac3177f2586a..a678191bd70b 100644 --- a/packages/jest-util/src/index.js +++ b/packages/jest-util/src/index.js @@ -11,13 +11,13 @@ import mkdirp from 'mkdirp'; import Console from './Console'; -import FakeTimers from './FakeTimers'; -import NullConsole from './NullConsole'; -import clearLine from './clearLine'; -import formatTestResults from './formatTestResults'; -import installCommonGlobals from './installCommonGlobals'; -import setGlobal from './setGlobal'; -import validateCLIOptions from './validateCLIOptions'; +import FakeTimers from './fake_timers'; +import NullConsole from './null_console'; +import clearLine from './clear_line'; +import formatTestResults from './format_test_results'; +import installCommonGlobals from './install_common_globals'; +import setGlobal from './set_global'; +import validateCLIOptions from './validate_cli_options'; const createDirectory = (path: string) => { try { diff --git a/packages/jest-util/src/installCommonGlobals.js b/packages/jest-util/src/install_common_globals.js similarity index 100% rename from packages/jest-util/src/installCommonGlobals.js rename to packages/jest-util/src/install_common_globals.js diff --git a/packages/jest-util/src/NullConsole.js b/packages/jest-util/src/null_console.js similarity index 100% rename from packages/jest-util/src/NullConsole.js rename to packages/jest-util/src/null_console.js diff --git a/packages/jest-util/src/setGlobal.js b/packages/jest-util/src/set_global.js similarity index 100% rename from packages/jest-util/src/setGlobal.js rename to packages/jest-util/src/set_global.js diff --git a/packages/jest-util/src/validateCLIOptions.js b/packages/jest-util/src/validate_cli_options.js similarity index 100% rename from packages/jest-util/src/validateCLIOptions.js rename to packages/jest-util/src/validate_cli_options.js diff --git a/packages/jest-validate/src/__tests__/__snapshots__/validate-test.js.snap b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.js.snap similarity index 100% rename from packages/jest-validate/src/__tests__/__snapshots__/validate-test.js.snap rename to packages/jest-validate/src/__tests__/__snapshots__/validate.test.js.snap diff --git a/packages/jest-validate/src/__tests__/fixtures/jestConfig.js b/packages/jest-validate/src/__tests__/fixtures/jest_config.js similarity index 100% rename from packages/jest-validate/src/__tests__/fixtures/jestConfig.js rename to packages/jest-validate/src/__tests__/fixtures/jest_config.js diff --git a/packages/jest-validate/src/__tests__/validate-test.js b/packages/jest-validate/src/__tests__/validate.test.js similarity index 95% rename from packages/jest-validate/src/__tests__/validate-test.js rename to packages/jest-validate/src/__tests__/validate.test.js index c44b17e0da16..da71c398384e 100644 --- a/packages/jest-validate/src/__tests__/validate-test.js +++ b/packages/jest-validate/src/__tests__/validate.test.js @@ -10,13 +10,13 @@ 'use strict'; const validate = require('../validate'); -const jestValidateExampleConfig = require('../exampleConfig'); -const jestValidateDefaultConfig = require('../defaultConfig'); +const jestValidateExampleConfig = require('../example_config'); +const jestValidateDefaultConfig = require('../default_config'); const { defaultConfig, validConfig, deprecatedConfig, -} = require('./fixtures/jestConfig'); +} = require('./fixtures/jest_config'); test('validates default Jest config', () => { expect( diff --git a/packages/jest-validate/src/defaultConfig.js b/packages/jest-validate/src/default_config.js similarity index 95% rename from packages/jest-validate/src/defaultConfig.js rename to packages/jest-validate/src/default_config.js index 11a56d9e9dbe..32f16ac13dfe 100644 --- a/packages/jest-validate/src/defaultConfig.js +++ b/packages/jest-validate/src/default_config.js @@ -13,7 +13,7 @@ import type {ValidationOptions} from './types'; import {deprecationWarning} from './deprecated'; import {unknownOptionWarning} from './warnings'; import {errorMessage} from './errors'; -import exampleConfig from './exampleConfig'; +import exampleConfig from './example_config'; import validationCondition from './condition'; import {ERROR, DEPRECATION, WARNING} from './utils'; diff --git a/packages/jest-validate/src/exampleConfig.js b/packages/jest-validate/src/example_config.js similarity index 100% rename from packages/jest-validate/src/exampleConfig.js rename to packages/jest-validate/src/example_config.js diff --git a/packages/jest-validate/src/validate.js b/packages/jest-validate/src/validate.js index 3074cd12bb3d..c079ebf94c99 100644 --- a/packages/jest-validate/src/validate.js +++ b/packages/jest-validate/src/validate.js @@ -10,7 +10,7 @@ import type {ValidationOptions} from './types'; -import defaultConfig from './defaultConfig'; +import defaultConfig from './default_config'; const _validate = (config: Object, options: ValidationOptions) => { let hasDeprecationWarnings = false; diff --git a/packages/pretty-format/perf/test.js b/packages/pretty-format/perf/test.js index 44ef79c29c0f..0fe159fc0103 100644 --- a/packages/pretty-format/perf/test.js +++ b/packages/pretty-format/perf/test.js @@ -13,7 +13,7 @@ import React from 'react'; import ReactTestRenderer from 'react-test-renderer'; import leftPad from 'left-pad'; import prettyFormat from '../build'; -import ReactTestComponent from '../build/plugins/ReactTestComponent'; +import ReactTestComponent from '../build/plugins/react_test_component'; import worldGeoJson from './world.geo.json'; const NANOSECONDS = 1000000000; diff --git a/packages/pretty-format/src/__tests__/__snapshots__/React-test.js.snap b/packages/pretty-format/src/__tests__/__snapshots__/react.test.js.snap similarity index 100% rename from packages/pretty-format/src/__tests__/__snapshots__/React-test.js.snap rename to packages/pretty-format/src/__tests__/__snapshots__/react.test.js.snap diff --git a/packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js b/packages/pretty-format/src/__tests__/asymmetric_matcher.test.js similarity index 98% rename from packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js rename to packages/pretty-format/src/__tests__/asymmetric_matcher.test.js index 0749fcb14bd9..692a3ef2dd3f 100644 --- a/packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js +++ b/packages/pretty-format/src/__tests__/asymmetric_matcher.test.js @@ -7,7 +7,7 @@ */ const prettyFormat = require('../'); -const AsymmetricMatcher = require('../plugins/AsymmetricMatcher'); +const AsymmetricMatcher = require('../plugins/asymmetric_matcher'); let options; function fnNameFor(func) { diff --git a/packages/pretty-format/src/__tests__/ConvertAnsi-test.js b/packages/pretty-format/src/__tests__/convert_ansi.test.js similarity index 96% rename from packages/pretty-format/src/__tests__/ConvertAnsi-test.js rename to packages/pretty-format/src/__tests__/convert_ansi.test.js index 184c4ca3fc1d..1de0d13750a8 100644 --- a/packages/pretty-format/src/__tests__/ConvertAnsi-test.js +++ b/packages/pretty-format/src/__tests__/convert_ansi.test.js @@ -8,7 +8,7 @@ const ansiStyle = require('ansi-styles'); const prettyFormat = require('../'); -const ConvertAnsiPlugin = require('../plugins/ConvertAnsi'); +const ConvertAnsiPlugin = require('../plugins/convert_ansi'); const prettyFormatResult = (val: string) => { return prettyFormat(val, { diff --git a/packages/pretty-format/src/__tests__/HTMLElement-test.js b/packages/pretty-format/src/__tests__/html_element.test.js similarity index 98% rename from packages/pretty-format/src/__tests__/HTMLElement-test.js rename to packages/pretty-format/src/__tests__/html_element.test.js index 359b63fe9b34..f03c44eaa95d 100644 --- a/packages/pretty-format/src/__tests__/HTMLElement-test.js +++ b/packages/pretty-format/src/__tests__/html_element.test.js @@ -11,7 +11,7 @@ 'use strict'; -const HTMLElementPlugin = require('../plugins/HTMLElement'); +const HTMLElementPlugin = require('../plugins/html_element'); const toPrettyPrintTo = require('./expect-util').getPrettyPrint([ HTMLElementPlugin, ]); diff --git a/packages/pretty-format/src/__tests__/Immutable-test.js b/packages/pretty-format/src/__tests__/immutable.test.js similarity index 98% rename from packages/pretty-format/src/__tests__/Immutable-test.js rename to packages/pretty-format/src/__tests__/immutable.test.js index 0820c505f978..64b540627982 100644 --- a/packages/pretty-format/src/__tests__/Immutable-test.js +++ b/packages/pretty-format/src/__tests__/immutable.test.js @@ -10,9 +10,9 @@ const React = require('react'); const Immutable = require('immutable'); -const ReactElementPlugin = require('../plugins/ReactElement'); -const ReactTestComponentPlugin = require('../plugins/ReactTestComponent'); -const ImmutablePlugins = require('../plugins/ImmutablePlugins'); +const ReactElementPlugin = require('../plugins/react_element'); +const ReactTestComponentPlugin = require('../plugins/react_test_component'); +const ImmutablePlugins = require('../plugins/immutable_plugins'); const toPrettyPrintTo = require('./expect-util').getPrettyPrint( [ReactElementPlugin, ReactTestComponentPlugin].concat(ImmutablePlugins), ); diff --git a/packages/pretty-format/src/__tests__/pretty-format-test.js b/packages/pretty-format/src/__tests__/pretty_format.test.js similarity index 100% rename from packages/pretty-format/src/__tests__/pretty-format-test.js rename to packages/pretty-format/src/__tests__/pretty_format.test.js diff --git a/packages/pretty-format/src/__tests__/React-test.js b/packages/pretty-format/src/__tests__/react.test.js similarity index 98% rename from packages/pretty-format/src/__tests__/React-test.js rename to packages/pretty-format/src/__tests__/react.test.js index 560428e459f5..871ccb7f0f15 100644 --- a/packages/pretty-format/src/__tests__/React-test.js +++ b/packages/pretty-format/src/__tests__/react.test.js @@ -10,8 +10,8 @@ const React = require('react'); const renderer = require('react-test-renderer'); const prettyFormat = require('../'); -const ReactTestComponent = require('../plugins/ReactTestComponent'); -const ReactElement = require('../plugins/ReactElement'); +const ReactTestComponent = require('../plugins/react_test_component'); +const ReactElement = require('../plugins/react_element'); function assertPrintedJSX(actual, expected, opts) { expect( diff --git a/packages/pretty-format/src/index.js b/packages/pretty-format/src/index.js index 5f6e04c2c608..1baab04fe05b 100644 --- a/packages/pretty-format/src/index.js +++ b/packages/pretty-format/src/index.js @@ -18,12 +18,12 @@ import type { import style from 'ansi-styles'; -import AsymmetricMatcher from './plugins/AsymmetricMatcher'; -import ConvertAnsi from './plugins/ConvertAnsi'; -import HTMLElement from './plugins/HTMLElement'; -import Immutable from './plugins/ImmutablePlugins'; -import ReactElement from './plugins/ReactElement'; -import ReactTestComponent from './plugins/ReactTestComponent'; +import AsymmetricMatcher from './plugins/asymmetric_matcher'; +import ConvertAnsi from './plugins/convert_ansi'; +import HTMLElement from './plugins/html_element'; +import Immutable from './plugins/immutable_plugins'; +import ReactElement from './plugins/react_element'; +import ReactTestComponent from './plugins/react_test_component'; type Theme = {| comment?: string, diff --git a/packages/pretty-format/src/plugins/AsymmetricMatcher.js b/packages/pretty-format/src/plugins/asymmetric_matcher.js similarity index 100% rename from packages/pretty-format/src/plugins/AsymmetricMatcher.js rename to packages/pretty-format/src/plugins/asymmetric_matcher.js diff --git a/packages/pretty-format/src/plugins/ConvertAnsi.js b/packages/pretty-format/src/plugins/convert_ansi.js similarity index 100% rename from packages/pretty-format/src/plugins/ConvertAnsi.js rename to packages/pretty-format/src/plugins/convert_ansi.js diff --git a/packages/pretty-format/src/plugins/HTMLElement.js b/packages/pretty-format/src/plugins/html_element.js similarity index 98% rename from packages/pretty-format/src/plugins/HTMLElement.js rename to packages/pretty-format/src/plugins/html_element.js index a30fb88f4c35..d840effdc668 100644 --- a/packages/pretty-format/src/plugins/HTMLElement.js +++ b/packages/pretty-format/src/plugins/html_element.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import escapeHTML from './lib/escapeHTML'; +import escapeHTML from './lib/escape_html'; type Attribute = { name: string, diff --git a/packages/pretty-format/src/plugins/ImmutableList.js b/packages/pretty-format/src/plugins/immutable_list.js similarity index 93% rename from packages/pretty-format/src/plugins/ImmutableList.js rename to packages/pretty-format/src/plugins/immutable_list.js index a9a957d415ba..0c02d164252b 100644 --- a/packages/pretty-format/src/plugins/ImmutableList.js +++ b/packages/pretty-format/src/plugins/immutable_list.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_LIST = '@@__IMMUTABLE_LIST__@@'; const test = (maybeList: any) => !!(maybeList && maybeList[IS_LIST]); diff --git a/packages/pretty-format/src/plugins/ImmutableMap.js b/packages/pretty-format/src/plugins/immutable_map.js similarity index 93% rename from packages/pretty-format/src/plugins/ImmutableMap.js rename to packages/pretty-format/src/plugins/immutable_map.js index e311985aada8..f66aaa2cf145 100644 --- a/packages/pretty-format/src/plugins/ImmutableMap.js +++ b/packages/pretty-format/src/plugins/immutable_map.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_MAP = '@@__IMMUTABLE_MAP__@@'; const IS_ORDERED = '@@__IMMUTABLE_ORDERED__@@'; diff --git a/packages/pretty-format/src/plugins/ImmutableOrderedMap.js b/packages/pretty-format/src/plugins/immutable_ordered_map.js similarity index 94% rename from packages/pretty-format/src/plugins/ImmutableOrderedMap.js rename to packages/pretty-format/src/plugins/immutable_ordered_map.js index c51199ed2882..ded415e2c650 100644 --- a/packages/pretty-format/src/plugins/ImmutableOrderedMap.js +++ b/packages/pretty-format/src/plugins/immutable_ordered_map.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_MAP = '@@__IMMUTABLE_MAP__@@'; const IS_ORDERED = '@@__IMMUTABLE_ORDERED__@@'; diff --git a/packages/pretty-format/src/plugins/ImmutableOrderedSet.js b/packages/pretty-format/src/plugins/immutable_ordered_set.js similarity index 94% rename from packages/pretty-format/src/plugins/ImmutableOrderedSet.js rename to packages/pretty-format/src/plugins/immutable_ordered_set.js index 88763fd78866..e43dbe5d570e 100644 --- a/packages/pretty-format/src/plugins/ImmutableOrderedSet.js +++ b/packages/pretty-format/src/plugins/immutable_ordered_set.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_SET = '@@__IMMUTABLE_SET__@@'; const IS_ORDERED = '@@__IMMUTABLE_ORDERED__@@'; diff --git a/packages/pretty-format/src/plugins/ImmutablePlugins.js b/packages/pretty-format/src/plugins/immutable_plugins.js similarity index 57% rename from packages/pretty-format/src/plugins/ImmutablePlugins.js rename to packages/pretty-format/src/plugins/immutable_plugins.js index 1ad73ce2839b..cd614fffef8d 100644 --- a/packages/pretty-format/src/plugins/ImmutablePlugins.js +++ b/packages/pretty-format/src/plugins/immutable_plugins.js @@ -8,13 +8,13 @@ * @flow */ -import ImmutableList from './ImmutableList'; -import ImmutableSet from './ImmutableSet'; -import ImmutableMap from './ImmutableMap'; -import ImmutableStack from './ImmutableStack'; -import ImmutableOrderedSet from './ImmutableOrderedSet'; -import ImmutableOrderedMap from './ImmutableOrderedMap'; -import ImmutableRecord from './ImmutableRecord'; +import ImmutableList from './immutable_list'; +import ImmutableSet from './immutable_set'; +import ImmutableMap from './immutable_map'; +import ImmutableStack from './immutable_stack'; +import ImmutableOrderedSet from './immutable_ordered_set'; +import ImmutableOrderedMap from './immutable_ordered_map'; +import ImmutableRecord from './immutable_record'; module.exports = [ ImmutableList, diff --git a/packages/pretty-format/src/plugins/ImmutableRecord.js b/packages/pretty-format/src/plugins/immutable_record.js similarity index 93% rename from packages/pretty-format/src/plugins/ImmutableRecord.js rename to packages/pretty-format/src/plugins/immutable_record.js index 1b8656b9ae76..7b25f21519db 100644 --- a/packages/pretty-format/src/plugins/ImmutableRecord.js +++ b/packages/pretty-format/src/plugins/immutable_record.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_RECORD = '@@__IMMUTABLE_RECORD__@@'; const test = (maybeRecord: any) => !!(maybeRecord && maybeRecord[IS_RECORD]); diff --git a/packages/pretty-format/src/plugins/ImmutableSet.js b/packages/pretty-format/src/plugins/immutable_set.js similarity index 93% rename from packages/pretty-format/src/plugins/ImmutableSet.js rename to packages/pretty-format/src/plugins/immutable_set.js index 74005a69c471..57ce45db5a5e 100644 --- a/packages/pretty-format/src/plugins/ImmutableSet.js +++ b/packages/pretty-format/src/plugins/immutable_set.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_SET = '@@__IMMUTABLE_SET__@@'; const IS_ORDERED = '@@__IMMUTABLE_ORDERED__@@'; diff --git a/packages/pretty-format/src/plugins/ImmutableStack.js b/packages/pretty-format/src/plugins/immutable_stack.js similarity index 93% rename from packages/pretty-format/src/plugins/ImmutableStack.js rename to packages/pretty-format/src/plugins/immutable_stack.js index 110400e8a996..75a22ce6160e 100644 --- a/packages/pretty-format/src/plugins/ImmutableStack.js +++ b/packages/pretty-format/src/plugins/immutable_stack.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import printImmutable from './lib/printImmutable'; +import printImmutable from './lib/print_immutable'; const IS_STACK = '@@__IMMUTABLE_STACK__@@'; const test = (maybeStack: any) => !!(maybeStack && maybeStack[IS_STACK]); diff --git a/packages/pretty-format/src/plugins/lib/escapeHTML.js b/packages/pretty-format/src/plugins/lib/escape_html.js similarity index 100% rename from packages/pretty-format/src/plugins/lib/escapeHTML.js rename to packages/pretty-format/src/plugins/lib/escape_html.js diff --git a/packages/pretty-format/src/plugins/lib/printImmutable.js b/packages/pretty-format/src/plugins/lib/print_immutable.js similarity index 100% rename from packages/pretty-format/src/plugins/lib/printImmutable.js rename to packages/pretty-format/src/plugins/lib/print_immutable.js diff --git a/packages/pretty-format/src/plugins/ReactElement.js b/packages/pretty-format/src/plugins/react_element.js similarity index 98% rename from packages/pretty-format/src/plugins/ReactElement.js rename to packages/pretty-format/src/plugins/react_element.js index 899e46e9824f..af996313a010 100644 --- a/packages/pretty-format/src/plugins/ReactElement.js +++ b/packages/pretty-format/src/plugins/react_element.js @@ -10,7 +10,7 @@ import type {Colors, Indent, Options, Print, Plugin} from 'types/PrettyFormat'; -import escapeHTML from './lib/escapeHTML'; +import escapeHTML from './lib/escape_html'; const reactElement = Symbol.for('react.element'); diff --git a/packages/pretty-format/src/plugins/ReactTestComponent.js b/packages/pretty-format/src/plugins/react_test_component.js similarity index 98% rename from packages/pretty-format/src/plugins/ReactTestComponent.js rename to packages/pretty-format/src/plugins/react_test_component.js index 97ca3be3d53e..72d37449e619 100644 --- a/packages/pretty-format/src/plugins/ReactTestComponent.js +++ b/packages/pretty-format/src/plugins/react_test_component.js @@ -18,7 +18,7 @@ import type { ReactTestChild, } from 'types/PrettyFormat'; -import escapeHTML from './lib/escapeHTML'; +import escapeHTML from './lib/escape_html'; const reactTestInstance = Symbol.for('react.test.json');