Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(jest-core): standardize files name #10702

Merged
merged 3 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/jest-core/src/__tests__/SearchSource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ describe('SearchSource', () => {
);
expect(relPaths.sort()).toEqual([
path.normalize('module.jsx'),
path.normalize('no_tests.js'),
path.normalize('noTests.js'),
]);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ Watch Usage
`;

exports[`Watch mode flows makes watch plugin initialization errors look nice 1`] = `
[Error: Failed to initialize watch plugin "packages/jest-core/src/__tests__/__fixtures__/watch_plugin_throws":
[Error: Failed to initialize watch plugin "packages/jest-core/src/__tests__/__fixtures__/watchPluginThrows":

● Test suite failed to run

initialization error

at Object.<anonymous> (__fixtures__/watch_plugin_throws.js:8:7)
at Object.<anonymous> (__fixtures__/watchPluginThrows.js:8:7)
]
`;

Expand Down
10 changes: 5 additions & 5 deletions packages/jest-core/src/__tests__/watch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {JestHook, KEYS} from 'jest-watcher';
import TestWatcher from '../TestWatcher';

const runJestMock = jest.fn();
const watchPluginPath = `${__dirname}/__fixtures__/watch_plugin`;
const watchPlugin2Path = `${__dirname}/__fixtures__/watch_plugin2`;
const watchPluginPath = `${__dirname}/__fixtures__/watchPlugin`;
const watchPlugin2Path = `${__dirname}/__fixtures__/watchPlugin2`;
let results;

jest.mock(
Expand Down Expand Up @@ -84,10 +84,10 @@ jest.doMock(
{virtual: true},
);

const regularUpdateGlobalConfig = require('../lib/update_global_config')
const regularUpdateGlobalConfig = require('../lib/updateGlobalConfig')
.default;
const updateGlobalConfig = jest.fn(regularUpdateGlobalConfig);
jest.doMock('../lib/update_global_config', () => updateGlobalConfig);
jest.doMock('../lib/updateGlobalConfig', () => updateGlobalConfig);

const nextTick = () => new Promise(res => process.nextTick(res));

Expand Down Expand Up @@ -583,7 +583,7 @@ describe('Watch mode flows', () => {
});

it('makes watch plugin initialization errors look nice', async () => {
const pluginPath = `${__dirname}/__fixtures__/watch_plugin_throws`;
const pluginPath = `${__dirname}/__fixtures__/watchPluginThrows`;

await expect(
watch(
Expand Down
6 changes: 3 additions & 3 deletions packages/jest-core/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import chalk = require('chalk');
import rimraf = require('rimraf');
import exit = require('exit');
import type {Filter} from '../types';
import createContext from '../lib/create_context';
import createContext from '../lib/createContext';
import getChangedFilesPromise from '../getChangedFilesPromise';
import {formatHandleErrors} from '../collectHandles';
import handleDeprecationWarnings from '../lib/handle_deprecation_warnings';
import handleDeprecationWarnings from '../lib/handleDeprecationWarnings';
import runJest from '../runJest';
import TestWatcher from '../TestWatcher';
import watch from '../watch';
import pluralize from '../pluralize';
import logDebugMessages from '../lib/log_debug_messages';
import logDebugMessages from '../lib/logDebugMessages';
import getConfigsOfProjectsToRun from '../getConfigsOfProjectsToRun';
import getProjectNamesMissingWarning from '../getProjectNamesMissingWarning';
import getSelectProjectsMessage from '../getSelectProjectsMessage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import * as path from 'path';
import isValidPath from '../is_valid_path';
import isValidPath from '../isValidPath';
import {makeGlobalConfig} from '../../../../../TestUtils';

const rootDir = path.resolve(path.sep, 'root');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import {wrap} from 'jest-snapshot-serializer-raw';
import logDebugMessages from '../log_debug_messages';
import logDebugMessages from '../logDebugMessages';
import {makeGlobalConfig, makeProjectConfig} from '../../../../../TestUtils';

jest.mock('../../../package.json', () => ({version: 123}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
UsageData,
} from 'jest-watcher';
import TestNamePatternPrompt from '../TestNamePatternPrompt';
import activeFilters from '../lib/active_filters_message';
import activeFilters from '../lib/activeFiltersMessage';

class TestNamePatternPlugin extends BaseWatchPlugin {
_prompt: Prompt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
UsageData,
} from 'jest-watcher';
import TestPathPatternPrompt from '../TestPathPatternPrompt';
import activeFilters from '../lib/active_filters_message';
import activeFilters from '../lib/activeFiltersMessage';

class TestPathPatternPlugin extends BaseWatchPlugin {
private _prompt: Prompt;
Expand Down
20 changes: 10 additions & 10 deletions packages/jest-core/src/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ import {
WatchPluginClass,
} from 'jest-watcher';
import getChangedFilesPromise from './getChangedFilesPromise';
import isValidPath from './lib/is_valid_path';
import createContext from './lib/create_context';
import isValidPath from './lib/isValidPath';
import createContext from './lib/createContext';
import runJest from './runJest';
import updateGlobalConfig from './lib/update_global_config';
import updateGlobalConfig from './lib/updateGlobalConfig';
import SearchSource from './SearchSource';
import TestWatcher from './TestWatcher';
import FailedTestsCache from './FailedTestsCache';
import TestPathPatternPlugin from './plugins/test_path_pattern';
import TestNamePatternPlugin from './plugins/test_name_pattern';
import UpdateSnapshotsPlugin from './plugins/update_snapshots';
import UpdateSnapshotsInteractivePlugin from './plugins/update_snapshots_interactive';
import QuitPlugin from './plugins/quit';
import TestPathPatternPlugin from './plugins/TestPathPattern';
import TestNamePatternPlugin from './plugins/TestNamePattern';
import UpdateSnapshotsPlugin from './plugins/UpdateSnapshots';
import UpdateSnapshotsInteractivePlugin from './plugins/UpdateSnapshotsInteractive';
import QuitPlugin from './plugins/Quit';
import {
filterInteractivePlugins,
getSortedUsageRows,
} from './lib/watch_plugins_helpers';
import activeFilters from './lib/active_filters_message';
} from './lib/watchPluginsHelpers';
import activeFilters from './lib/activeFiltersMessage';
import type {Filter} from './types';

type ReservedInfo = {
Expand Down