diff --git a/.eslintrc.js b/.eslintrc.js index 01c5257b4288..1938dbcfd544 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,7 @@ */ const path = require('path'); -const customImportResolver = path.resolve('./eslint_import_resolver'); +const customImportResolver = path.resolve('./eslintImportResolver'); module.exports = { extends: [ @@ -89,7 +89,7 @@ module.exports = { 'scripts/**/*', 'integration-tests/*/**/*', 'website/*/**/*', - 'eslint_import_resolver.js', + 'eslintImportResolver.js', ], rules: { 'prettier/prettier': [ @@ -150,8 +150,8 @@ module.exports = { '**/__mocks__/**', '**/?(*.)(spec|test).js?(x)', 'scripts/**', - 'eslint_import_resolver.js', - 'test_setup_file.js', + 'eslintImportResolver.js', + 'testSetupFile.js', ], }, ], @@ -168,7 +168,7 @@ module.exports = { trailingComma: 'all', }, ], - 'unicorn/filename-case': [2, {case: 'snakeCase'}], + 'unicorn/filename-case': [1, {case: 'snakeCase'}], }, settings: { 'import/resolver': { diff --git a/CHANGELOG.md b/CHANGELOG.md index c56b24dca680..125f3c0c5737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ process. It will be available via `process.env.JEST_WORKER_ID` ([#5494](https://github.com/facebook/jest/pull/5494)) +### Chore & Maintenance +* `[filenames]` Standardize file names in root ([#5500](https://github.com/facebook/jest/pull/5500)) + + ## jest 22.2.1 ### Fixes diff --git a/test_utils.js b/TestUtils.js similarity index 100% rename from test_utils.js rename to TestUtils.js diff --git a/eslint_import_resolver.js b/eslintImportResolver.js similarity index 100% rename from eslint_import_resolver.js rename to eslintImportResolver.js diff --git a/package.json b/package.json index f3c86f30b72c..524333ff50b4 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "transform": { "^.+\\.js$": "/packages/babel-jest" }, - "setupTestFrameworkScriptFile": "/test_setup_file.js", + "setupTestFrameworkScriptFile": "/testSetupFile.js", "snapshotSerializers": [ "/packages/pretty-format/build/plugins/convert_ansi.js" ], diff --git a/packages/jest-cli/src/__tests__/generate_empty_coverage.test.js b/packages/jest-cli/src/__tests__/generate_empty_coverage.test.js index 74ed06e74992..c8445f016ebc 100644 --- a/packages/jest-cli/src/__tests__/generate_empty_coverage.test.js +++ b/packages/jest-cli/src/__tests__/generate_empty_coverage.test.js @@ -11,7 +11,7 @@ import generateEmptyCoverage from '../generate_empty_coverage'; const os = require('os'); -const {makeGlobalConfig, makeProjectConfig} = require('../../../../test_utils'); +const {makeGlobalConfig, makeProjectConfig} = require('../../../../TestUtils'); jest.mock('jest-runtime', () => { // $FlowFixMe requireActual diff --git a/packages/jest-cli/src/lib/__tests__/is_valid_path.test.js b/packages/jest-cli/src/lib/__tests__/is_valid_path.test.js index 9132893f1b3a..437a429b5492 100644 --- a/packages/jest-cli/src/lib/__tests__/is_valid_path.test.js +++ b/packages/jest-cli/src/lib/__tests__/is_valid_path.test.js @@ -13,7 +13,7 @@ const path = require('path'); const { makeGlobalConfig, makeProjectConfig, -} = require('../../../../../test_utils'); +} = require('../../../../../TestUtils'); const rootDir = path.resolve(path.sep, 'root'); diff --git a/packages/jest-config/src/valid_config.js b/packages/jest-config/src/valid_config.js index d866c8a9087f..4ca0ba8d677d 100644 --- a/packages/jest-config/src/valid_config.js +++ b/packages/jest-config/src/valid_config.js @@ -79,7 +79,7 @@ export default ({ runTestsByPath: false, runner: 'jest-runner', setupFiles: ['/setup.js'], - setupTestFrameworkScriptFile: '/test_setup_file.js', + setupTestFrameworkScriptFile: '/testSetupFile.js', silent: true, skipNodeResolution: false, snapshotSerializers: ['my-serializer-module'], diff --git a/packages/jest-validate/src/__tests__/fixtures/jest_config.js b/packages/jest-validate/src/__tests__/fixtures/jest_config.js index edbea621e15e..1395c62f0203 100644 --- a/packages/jest-validate/src/__tests__/fixtures/jest_config.js +++ b/packages/jest-validate/src/__tests__/fixtures/jest_config.js @@ -105,7 +105,7 @@ const validConfig = { rootDir: '/', roots: [''], setupFiles: ['/setup.js'], - setupTestFrameworkScriptFile: '/test_setup_file.js', + setupTestFrameworkScriptFile: '/testSetupFile.js', silent: true, snapshotSerializers: ['my-serializer-module'], testEnvironment: 'jest-environment-jsdom', diff --git a/test_setup_file.js b/testSetupFile.js similarity index 100% rename from test_setup_file.js rename to testSetupFile.js