diff --git a/packages/jest-reporters/src/base_reporter.ts b/packages/jest-reporters/src/BaseReporter.ts similarity index 100% rename from packages/jest-reporters/src/base_reporter.ts rename to packages/jest-reporters/src/BaseReporter.ts diff --git a/packages/jest-reporters/src/coverage_reporter.ts b/packages/jest-reporters/src/CoverageReporter.ts similarity index 98% rename from packages/jest-reporters/src/coverage_reporter.ts rename to packages/jest-reporters/src/CoverageReporter.ts index 9e1918bc8726..612cdedaae40 100644 --- a/packages/jest-reporters/src/coverage_reporter.ts +++ b/packages/jest-reporters/src/CoverageReporter.ts @@ -25,14 +25,14 @@ import Worker from 'jest-worker'; import glob = require('glob'); import v8toIstanbul = require('v8-to-istanbul'); import type {RawSourceMap} from 'source-map'; -import BaseReporter from './base_reporter'; +import BaseReporter from './BaseReporter'; import type { Context, CoverageReporterOptions, CoverageWorker, Test, } from './types'; -import getWatermarks from './get_watermarks'; +import getWatermarks from './getWatermarks'; // This is fixed in a newer versions of source-map, but our dependencies are still stuck on old versions interface FixedRawSourceMap extends Omit { @@ -149,9 +149,9 @@ export default class CoverageReporter extends BaseReporter { let worker: CoverageWorker | Worker; if (this._globalConfig.maxWorkers <= 1) { - worker = require('./coverage_worker'); + worker = require('./CoverageWorker'); } else { - worker = new Worker(require.resolve('./coverage_worker'), { + worker = new Worker(require.resolve('./CoverageWorker'), { exposedMethods: ['worker'], maxRetries: 2, numWorkers: this._globalConfig.maxWorkers, diff --git a/packages/jest-reporters/src/coverage_worker.ts b/packages/jest-reporters/src/CoverageWorker.ts similarity index 100% rename from packages/jest-reporters/src/coverage_worker.ts rename to packages/jest-reporters/src/CoverageWorker.ts diff --git a/packages/jest-reporters/src/default_reporter.ts b/packages/jest-reporters/src/DefaultReporter.ts similarity index 97% rename from packages/jest-reporters/src/default_reporter.ts rename to packages/jest-reporters/src/DefaultReporter.ts index 7c7f496856f8..d45c07138ab9 100644 --- a/packages/jest-reporters/src/default_reporter.ts +++ b/packages/jest-reporters/src/DefaultReporter.ts @@ -16,10 +16,10 @@ import {clearLine, isInteractive} from 'jest-util'; import {getConsoleOutput} from '@jest/console'; import chalk = require('chalk'); import type {ReporterOnStartOptions, Test} from './types'; -import BaseReporter from './base_reporter'; +import BaseReporter from './BaseReporter'; import Status from './Status'; -import getResultHeader from './get_result_header'; -import getSnapshotStatus from './get_snapshot_status'; +import getResultHeader from './getResultHeader'; +import getSnapshotStatus from './getSnapshotStatus'; type write = NodeJS.WriteStream['write']; type FlushBufferedOutput = () => void; diff --git a/packages/jest-reporters/src/notify_reporter.ts b/packages/jest-reporters/src/NotifyReporter.ts similarity index 99% rename from packages/jest-reporters/src/notify_reporter.ts rename to packages/jest-reporters/src/NotifyReporter.ts index f6f0bd367924..0c9012282a1c 100644 --- a/packages/jest-reporters/src/notify_reporter.ts +++ b/packages/jest-reporters/src/NotifyReporter.ts @@ -12,7 +12,7 @@ import type {Config} from '@jest/types'; import type {AggregatedResult} from '@jest/test-result'; import {pluralize} from 'jest-util'; import type {Context, TestSchedulerContext} from './types'; -import BaseReporter from './base_reporter'; +import BaseReporter from './BaseReporter'; const isDarwin = process.platform === 'darwin'; diff --git a/packages/jest-reporters/src/summary_reporter.ts b/packages/jest-reporters/src/SummaryReporter.ts similarity index 97% rename from packages/jest-reporters/src/summary_reporter.ts rename to packages/jest-reporters/src/SummaryReporter.ts index 73e17cb93087..203b365ead9a 100644 --- a/packages/jest-reporters/src/summary_reporter.ts +++ b/packages/jest-reporters/src/SummaryReporter.ts @@ -10,10 +10,10 @@ import type {AggregatedResult, SnapshotSummary} from '@jest/test-result'; import chalk = require('chalk'); import {testPathPatternToRegExp} from 'jest-util'; import type {Context, ReporterOnStartOptions} from './types'; -import BaseReporter from './base_reporter'; +import BaseReporter from './BaseReporter'; import {getSummary} from './utils'; -import getResultHeader from './get_result_header'; -import getSnapshotSummary from './get_snapshot_summary'; +import getResultHeader from './getResultHeader'; +import getSnapshotSummary from './getSnapshotSummary'; const TEST_SUMMARY_THRESHOLD = 20; diff --git a/packages/jest-reporters/src/verbose_reporter.ts b/packages/jest-reporters/src/VerboseReporter.ts similarity index 98% rename from packages/jest-reporters/src/verbose_reporter.ts rename to packages/jest-reporters/src/VerboseReporter.ts index 61620532170a..d6c5f986e3b8 100644 --- a/packages/jest-reporters/src/verbose_reporter.ts +++ b/packages/jest-reporters/src/VerboseReporter.ts @@ -15,7 +15,7 @@ import type { import chalk = require('chalk'); import {formatTime, specialChars} from 'jest-util'; import type {Test} from './types'; -import DefaultReporter from './default_reporter'; +import DefaultReporter from './DefaultReporter'; const {ICONS} = specialChars; diff --git a/packages/jest-reporters/src/__tests__/coverage_reporter.test.js b/packages/jest-reporters/src/__tests__/CoverageReporter.test.js similarity index 99% rename from packages/jest-reporters/src/__tests__/coverage_reporter.test.js rename to packages/jest-reporters/src/__tests__/CoverageReporter.test.js index e15df8cbdd59..1c99e9a9680c 100644 --- a/packages/jest-reporters/src/__tests__/coverage_reporter.test.js +++ b/packages/jest-reporters/src/__tests__/CoverageReporter.test.js @@ -26,7 +26,7 @@ import path from 'path'; import mock from 'mock-fs'; beforeEach(() => { - CoverageReporter = require('../coverage_reporter').default; + CoverageReporter = require('../CoverageReporter').default; libCoverage = require('istanbul-lib-coverage'); libSourceMaps = require('istanbul-lib-source-maps'); istanbulReports = require('istanbul-reports'); diff --git a/packages/jest-reporters/src/__tests__/coverage_worker.test.js b/packages/jest-reporters/src/__tests__/CoverageWorker.test.js similarity index 96% rename from packages/jest-reporters/src/__tests__/coverage_worker.test.js rename to packages/jest-reporters/src/__tests__/CoverageWorker.test.js index 913cf4753c9a..d8b83408f52e 100644 --- a/packages/jest-reporters/src/__tests__/coverage_worker.test.js +++ b/packages/jest-reporters/src/__tests__/CoverageWorker.test.js @@ -22,7 +22,7 @@ beforeEach(() => { fs = require('graceful-fs'); generateEmptyCoverage = require('../generateEmptyCoverage').default; - worker = require('../coverage_worker').worker; + worker = require('../CoverageWorker').worker; }); test('resolves to the result of generateEmptyCoverage upon success', async () => { diff --git a/packages/jest-reporters/src/__tests__/default_reporter.test.js b/packages/jest-reporters/src/__tests__/DefaultReporter.test.js similarity index 97% rename from packages/jest-reporters/src/__tests__/default_reporter.test.js rename to packages/jest-reporters/src/__tests__/DefaultReporter.test.js index c714842eb3a9..8bf82aacb72f 100644 --- a/packages/jest-reporters/src/__tests__/default_reporter.test.js +++ b/packages/jest-reporters/src/__tests__/DefaultReporter.test.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import DefaultReporter from '../default_reporter'; +import DefaultReporter from '../DefaultReporter'; jest.mock('jest-util', () => ({ ...jest.requireActual('jest-util'), diff --git a/packages/jest-reporters/src/__tests__/notify_reporter.test.ts b/packages/jest-reporters/src/__tests__/NotifyReporter.test.ts similarity index 98% rename from packages/jest-reporters/src/__tests__/notify_reporter.test.ts rename to packages/jest-reporters/src/__tests__/NotifyReporter.test.ts index 3e0e112a48d0..137a264483d1 100644 --- a/packages/jest-reporters/src/__tests__/notify_reporter.test.ts +++ b/packages/jest-reporters/src/__tests__/NotifyReporter.test.ts @@ -8,10 +8,10 @@ import type {AggregatedResult} from '@jest/test-result'; import type {Config} from '@jest/types'; import Resolver from 'jest-resolve'; -import NotifyReporter from '../notify_reporter'; +import NotifyReporter from '../NotifyReporter'; import {makeGlobalConfig} from '../../../../TestUtils'; -jest.mock('../default_reporter'); +jest.mock('../DefaultReporter'); jest.mock('node-notifier', () => ({ notify: jest.fn(), })); diff --git a/packages/jest-reporters/src/__tests__/summary_reporter.test.js b/packages/jest-reporters/src/__tests__/SummaryReporter.test.js similarity index 98% rename from packages/jest-reporters/src/__tests__/summary_reporter.test.js rename to packages/jest-reporters/src/__tests__/SummaryReporter.test.js index ead47477fc61..118f21f58a89 100644 --- a/packages/jest-reporters/src/__tests__/summary_reporter.test.js +++ b/packages/jest-reporters/src/__tests__/SummaryReporter.test.js @@ -20,7 +20,7 @@ let results = []; function requireReporter() { jest.isolateModules(() => { - SummaryReporter = require('../summary_reporter').default; + SummaryReporter = require('../SummaryReporter').default; }); } diff --git a/packages/jest-reporters/src/__tests__/verbose_reporter.test.js b/packages/jest-reporters/src/__tests__/VerboseReporter.test.js similarity index 99% rename from packages/jest-reporters/src/__tests__/verbose_reporter.test.js rename to packages/jest-reporters/src/__tests__/VerboseReporter.test.js index a13f6bd614bb..21aab8862b4a 100644 --- a/packages/jest-reporters/src/__tests__/verbose_reporter.test.js +++ b/packages/jest-reporters/src/__tests__/VerboseReporter.test.js @@ -12,7 +12,7 @@ const wrap = obj => ({suites: obj, tests: [], title: ''}); let groupTestsBySuites; beforeEach(() => { - const VerboseReporter = require('../verbose_reporter').default; + const VerboseReporter = require('../VerboseReporter').default; groupTestsBySuites = VerboseReporter.groupTestsBySuites; }); diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/notify_reporter.test.ts.snap b/packages/jest-reporters/src/__tests__/__snapshots__/NotifyReporter.test.ts.snap similarity index 100% rename from packages/jest-reporters/src/__tests__/__snapshots__/notify_reporter.test.ts.snap rename to packages/jest-reporters/src/__tests__/__snapshots__/NotifyReporter.test.ts.snap diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/SummaryReporter.test.js.snap similarity index 100% rename from packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap rename to packages/jest-reporters/src/__tests__/__snapshots__/SummaryReporter.test.js.snap diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/get_snapshot_status.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotStatus.test.js.snap similarity index 100% rename from packages/jest-reporters/src/__tests__/__snapshots__/get_snapshot_status.test.js.snap rename to packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotStatus.test.js.snap diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/get_snapshot_summary.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotSummary.test.js.snap similarity index 100% rename from packages/jest-reporters/src/__tests__/__snapshots__/get_snapshot_summary.test.js.snap rename to packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotSummary.test.js.snap diff --git a/packages/jest-reporters/src/__tests__/get_result_header.test.js b/packages/jest-reporters/src/__tests__/getResultHeader.test.js similarity index 97% rename from packages/jest-reporters/src/__tests__/get_result_header.test.js rename to packages/jest-reporters/src/__tests__/getResultHeader.test.js index a15a4e3df424..c4703f85e783 100644 --- a/packages/jest-reporters/src/__tests__/get_result_header.test.js +++ b/packages/jest-reporters/src/__tests__/getResultHeader.test.js @@ -6,7 +6,7 @@ */ import {makeGlobalConfig} from '../../../../TestUtils'; -import getResultHeader from '../get_result_header'; +import getResultHeader from '../getResultHeader'; const terminalLink = require('terminal-link'); jest.mock('terminal-link', () => jest.fn(() => 'wannabehyperlink')); diff --git a/packages/jest-reporters/src/__tests__/get_snapshot_status.test.js b/packages/jest-reporters/src/__tests__/getSnapshotStatus.test.js similarity index 95% rename from packages/jest-reporters/src/__tests__/get_snapshot_status.test.js rename to packages/jest-reporters/src/__tests__/getSnapshotStatus.test.js index dbbaee15773b..cffbad6e24c4 100644 --- a/packages/jest-reporters/src/__tests__/get_snapshot_status.test.js +++ b/packages/jest-reporters/src/__tests__/getSnapshotStatus.test.js @@ -7,7 +7,7 @@ 'use strict'; -import getSnapshotStatus from '../get_snapshot_status'; +import getSnapshotStatus from '../getSnapshotStatus'; test('Retrieves the snapshot status', () => { const snapshotResult = { diff --git a/packages/jest-reporters/src/__tests__/get_snapshot_summary.test.js b/packages/jest-reporters/src/__tests__/getSnapshotSummary.test.js similarity index 97% rename from packages/jest-reporters/src/__tests__/get_snapshot_summary.test.js rename to packages/jest-reporters/src/__tests__/getSnapshotSummary.test.js index fb76b156b1e2..7814c335abb2 100644 --- a/packages/jest-reporters/src/__tests__/get_snapshot_summary.test.js +++ b/packages/jest-reporters/src/__tests__/getSnapshotSummary.test.js @@ -7,7 +7,7 @@ 'use strict'; -import getSnapshotSummary from '../get_snapshot_summary'; +import getSnapshotSummary from '../getSnapshotSummary'; const UPDATE_COMMAND = 'press --u'; diff --git a/packages/jest-reporters/src/__tests__/get_watermarks.test.ts b/packages/jest-reporters/src/__tests__/getWatermarks.test.ts similarity index 96% rename from packages/jest-reporters/src/__tests__/get_watermarks.test.ts rename to packages/jest-reporters/src/__tests__/getWatermarks.test.ts index 2b47c5159e09..9e4f67341e47 100644 --- a/packages/jest-reporters/src/__tests__/get_watermarks.test.ts +++ b/packages/jest-reporters/src/__tests__/getWatermarks.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import getWatermarks from '../get_watermarks'; +import getWatermarks from '../getWatermarks'; import {makeGlobalConfig} from '../../../../TestUtils'; describe('getWatermarks', () => { diff --git a/packages/jest-reporters/src/get_result_header.ts b/packages/jest-reporters/src/getResultHeader.ts similarity index 100% rename from packages/jest-reporters/src/get_result_header.ts rename to packages/jest-reporters/src/getResultHeader.ts diff --git a/packages/jest-reporters/src/get_snapshot_status.ts b/packages/jest-reporters/src/getSnapshotStatus.ts similarity index 100% rename from packages/jest-reporters/src/get_snapshot_status.ts rename to packages/jest-reporters/src/getSnapshotStatus.ts diff --git a/packages/jest-reporters/src/get_snapshot_summary.ts b/packages/jest-reporters/src/getSnapshotSummary.ts similarity index 100% rename from packages/jest-reporters/src/get_snapshot_summary.ts rename to packages/jest-reporters/src/getSnapshotSummary.ts diff --git a/packages/jest-reporters/src/get_watermarks.ts b/packages/jest-reporters/src/getWatermarks.ts similarity index 100% rename from packages/jest-reporters/src/get_watermarks.ts rename to packages/jest-reporters/src/getWatermarks.ts diff --git a/packages/jest-reporters/src/index.ts b/packages/jest-reporters/src/index.ts index 53c9b8f811c7..d201fbd481f3 100644 --- a/packages/jest-reporters/src/index.ts +++ b/packages/jest-reporters/src/index.ts @@ -18,12 +18,12 @@ export type { SnapshotSummary, TestResult, } from '@jest/test-result'; -export {default as BaseReporter} from './base_reporter'; -export {default as CoverageReporter} from './coverage_reporter'; -export {default as DefaultReporter} from './default_reporter'; -export {default as NotifyReporter} from './notify_reporter'; -export {default as SummaryReporter} from './summary_reporter'; -export {default as VerboseReporter} from './verbose_reporter'; +export {default as BaseReporter} from './BaseReporter'; +export {default as CoverageReporter} from './CoverageReporter'; +export {default as DefaultReporter} from './DefaultReporter'; +export {default as NotifyReporter} from './NotifyReporter'; +export {default as SummaryReporter} from './SummaryReporter'; +export {default as VerboseReporter} from './VerboseReporter'; export type { Context, Reporter, diff --git a/packages/jest-reporters/src/types.ts b/packages/jest-reporters/src/types.ts index 45dc7c5c00f6..2add1587a315 100644 --- a/packages/jest-reporters/src/types.ts +++ b/packages/jest-reporters/src/types.ts @@ -14,7 +14,7 @@ import type { } from '@jest/test-result'; import type {FS as HasteFS, ModuleMap} from 'jest-haste-map'; import type {ResolverType} from 'jest-resolve'; -import type {worker} from './coverage_worker'; +import type {worker} from './CoverageWorker'; export type ReporterOnStartOptions = { estimatedTime: number;