Skip to content

Commit 5501be2

Browse files
committed
chore(filenames): fix intergration-tests subfolders
Fixes all the folder names in the integration-tests folder to follow Facebook internal file / folder naming conventions. This is the first of several incremental PRs.
1 parent 3f15450 commit 5501be2

File tree

123 files changed

+87
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+87
-81
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
the case of `--lastCommit`, `--findRelatedTests`, or `--onlyChanged` options
77
having been passed to the CLI
88

9+
### Chore & Maintenance
10+
11+
* `[filenames]` Standardize folder names under `integration-tests/`
12+
([#5298](https://github.com/facebook/jest/pull/5298))
13+
14+
915
## jest 22.0.6
1016

1117
### Fixes

integration-tests/__tests__/__snapshots__/coverage_report.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ exports[`outputs coverage report 1`] = `
4747
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
4848
-------------------------------------|----------|----------|----------|----------|----------------|
4949
All files | 56.52 | 0 | 50 | 56.52 | |
50-
coverage_report | 41.18 | 0 | 25 | 41.18 | |
50+
coverage-report | 41.18 | 0 | 25 | 41.18 | |
5151
not-required-in-test-suite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
5252
other-file.js | 100 | 100 | 100 | 100 | |
5353
sum.js | 85.71 | 100 | 50 | 85.71 | 12 |
5454
sum_dependency.js | 0 | 0 | 0 | 0 | 8,10,11,14 |
55-
coverage_report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
55+
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
5656
identical.js | 100 | 100 | 100 | 100 | |
57-
coverage_report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
57+
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
5858
identical.js | 100 | 100 | 100 | 100 | |
5959
-------------------------------------|----------|----------|----------|----------|----------------|
6060
"

integration-tests/__tests__/__snapshots__/list_tests.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
exports[`--listTests flag causes tests to be printed in different lines 1`] = `
44
"
5-
/MOCK_ABOLUTE_PATH/integration-tests/list_tests/__tests__/dummy.test.js
6-
/MOCK_ABOLUTE_PATH/integration-tests/list_tests/__tests__/other.test.js"
5+
/MOCK_ABOLUTE_PATH/integration-tests/list-tests/__tests__/dummy.test.js
6+
/MOCK_ABOLUTE_PATH/integration-tests/list-tests/__tests__/other.test.js"
77
`;
88

9-
exports[`--listTests flag causes tests to be printed out as JSON when using the --json flag 1`] = `"[\\"/MOCK_ABOLUTE_PATH/integration-tests/list_tests/__tests__/dummy.test.js\\",\\"/MOCK_ABOLUTE_PATH/integration-tests/list_tests/__tests__/other.test.js\\"]"`;
9+
exports[`--listTests flag causes tests to be printed out as JSON when using the --json flag 1`] = `"[\\"/MOCK_ABOLUTE_PATH/integration-tests/list-tests/__tests__/dummy.test.js\\",\\"/MOCK_ABOLUTE_PATH/integration-tests/list-tests/__tests__/other.test.js\\"]"`;

integration-tests/__tests__/clear_cache.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ const os = require('os');
1313
const path = require('path');
1414
const runJest = require('../runJest');
1515

16-
const CACHE = path.resolve(os.tmpdir(), 'clear_cache_directory');
16+
const CACHE = path.resolve(os.tmpdir(), 'clear-cache_directory');
1717

1818
describe('jest --clearCache', () => {
1919
test('normal run results in cache directory being written', () => {
20-
const {status} = runJest('clear_cache', [`--cacheDirectory=${CACHE}`]);
20+
const {status} = runJest('clear-cache', [`--cacheDirectory=${CACHE}`]);
2121

2222
expect(fs.existsSync(CACHE)).toBe(true);
2323
expect(status).toBe(0);
2424
});
2525
test('clearCache results in deleted directory and exit status 0', () => {
2626
expect(fs.existsSync(CACHE)).toBe(true);
2727

28-
const {status, stdout, stderr} = runJest('clear_cache', [
28+
const {status, stdout, stderr} = runJest('clear-cache', [
2929
'--clearCache',
3030
`--cacheDirectory=${CACHE}`,
3131
]);

integration-tests/__tests__/config.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
const runJest = require('../runJest');
1212

1313
test('config as JSON', () => {
14-
const result = runJest('verbose_reporter', [
14+
const result = runJest('verbose-reporter', [
1515
'--config=' +
1616
JSON.stringify({
1717
testEnvironment: 'node',
@@ -25,7 +25,7 @@ test('config as JSON', () => {
2525
});
2626

2727
test('works with sane config JSON', () => {
28-
const result = runJest('verbose_reporter', [
28+
const result = runJest('verbose-reporter', [
2929
'--config=' +
3030
JSON.stringify({
3131
testEnvironment: 'node',
@@ -38,7 +38,7 @@ test('works with sane config JSON', () => {
3838
});
3939

4040
test('watchman config option is respected over default argv', () => {
41-
const {stdout} = runJest('verbose_reporter', [
41+
const {stdout} = runJest('verbose-reporter', [
4242
'--env=node',
4343
'--watchman=false',
4444
'--debug',
@@ -48,7 +48,7 @@ test('watchman config option is respected over default argv', () => {
4848
});
4949

5050
test('config from argv is respected with sane config JSON', () => {
51-
const {stdout} = runJest('verbose_reporter', [
51+
const {stdout} = runJest('verbose-reporter', [
5252
'--config=' +
5353
JSON.stringify({
5454
testEnvironment: 'node',

integration-tests/__tests__/coverage_report.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ const skipOnWindows = require('../../scripts/skip_on_windows');
1414
const {extractSummary} = require('../utils');
1515
const runJest = require('../runJest');
1616

17-
const DIR = path.resolve(__dirname, '../coverage_report');
17+
const DIR = path.resolve(__dirname, '../coverage-report');
1818

1919
skipOnWindows.suite();
2020

2121
test('outputs coverage report', () => {
2222
const {stdout, status} = runJest(DIR, ['--no-cache', '--coverage']);
23-
const coverageDir = path.resolve(__dirname, '../coverage_report/coverage');
23+
const coverageDir = path.resolve(__dirname, '../coverage-report/coverage');
2424

2525
// - the `setup.js` file is ignored and should not be in the coverage report.
2626
// - `sum_dependency.js` is mocked and the real module is never required but
@@ -60,7 +60,7 @@ test('collects coverage only from specified files avoiding dependencies', () =>
6060
});
6161

6262
test('json reporter printing with --coverage', () => {
63-
const {stderr, status} = runJest('json_reporter', ['--coverage']);
63+
const {stderr, status} = runJest('json-reporter', ['--coverage']);
6464
const {summary} = extractSummary(stderr);
6565
expect(status).toBe(1);
6666
expect(summary).toMatchSnapshot();

integration-tests/__tests__/custom_matcher_stack_trace.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const skipOnWindows = require('../../scripts/skip_on_windows');
1515
skipOnWindows.suite();
1616

1717
test('works with custom matchers', () => {
18-
const {stderr} = runJest('custom_matcher_stack_trace');
18+
const {stderr} = runJest('custom-matcher-stack-trace');
1919

2020
let {rest} = extractSummary(stderr);
2121

integration-tests/__tests__/custom_reporters.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const runJest = require('../runJest');
1414
const os = require('os');
1515
const path = require('path');
1616

17-
const DIR = path.resolve(os.tmpdir(), 'custom_reporters_test_dir');
17+
const DIR = path.resolve(os.tmpdir(), 'custom-reporters_test_dir');
1818

1919
beforeEach(() => cleanup(DIR));
2020
afterEach(() => cleanup(DIR));
@@ -27,7 +27,7 @@ describe('Custom Reporters Integration', () => {
2727
reporters: ['<rootDir>/reporters/test_reporter.js'],
2828
};
2929

30-
const {status} = runJest('custom_reporters', [
30+
const {status} = runJest('custom-reporters', [
3131
'--config',
3232
JSON.stringify(reporterConfig),
3333
'add.test.js',
@@ -46,7 +46,7 @@ describe('Custom Reporters Integration', () => {
4646
],
4747
};
4848

49-
const {status, stdout} = runJest('custom_reporters', [
49+
const {status, stdout} = runJest('custom-reporters', [
5050
'--config',
5151
JSON.stringify(reporterConfig),
5252
'add.test.js',
@@ -61,7 +61,7 @@ describe('Custom Reporters Integration', () => {
6161
reporters: [[3243242]],
6262
};
6363

64-
const {status, stderr} = runJest('custom_reporters', [
64+
const {status, stderr} = runJest('custom-reporters', [
6565
'--config',
6666
JSON.stringify(reporterConfig),
6767
'add.test.js',
@@ -72,7 +72,7 @@ describe('Custom Reporters Integration', () => {
7272
});
7373

7474
test('default reporters enabled', () => {
75-
const {stderr, stdout, status} = runJest('custom_reporters', [
75+
const {stderr, stdout, status} = runJest('custom-reporters', [
7676
'--config',
7777
JSON.stringify({
7878
reporters: ['default', '<rootDir>/reporters/test_reporter.js'],
@@ -90,7 +90,7 @@ describe('Custom Reporters Integration', () => {
9090
});
9191

9292
test('TestReporter with all tests passing', () => {
93-
const {stdout, status, stderr} = runJest('custom_reporters', [
93+
const {stdout, status, stderr} = runJest('custom-reporters', [
9494
'add.test.js',
9595
]);
9696

@@ -102,7 +102,7 @@ describe('Custom Reporters Integration', () => {
102102
});
103103

104104
test('TestReporter with all tests failing', () => {
105-
const {stdout, status, stderr} = runJest('custom_reporters', [
105+
const {stdout, status, stderr} = runJest('custom-reporters', [
106106
'add_fail.test.js',
107107
]);
108108

@@ -114,7 +114,7 @@ describe('Custom Reporters Integration', () => {
114114
});
115115

116116
test('IncompleteReporter for flexibility', () => {
117-
const {stderr, stdout, status} = runJest('custom_reporters', [
117+
const {stderr, stdout, status} = runJest('custom-reporters', [
118118
'--no-cache',
119119
'--config',
120120
JSON.stringify({

integration-tests/__tests__/debug.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const runJest = require('../runJest');
1313
describe('jest --debug', () => {
1414
skipOnWindows.suite();
1515

16-
const dir = path.resolve(__dirname, '..', 'verbose_reporter');
16+
const dir = path.resolve(__dirname, '..', 'verbose-reporter');
1717

1818
it('outputs debugging info before running the test', () => {
1919
const {stdout} = runJest(dir, ['--debug', '--no-cache']);

integration-tests/__tests__/empty_suite_error.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
const path = require('path');
1212
const runJest = require('../runJest');
1313

14-
const DIR = path.resolve(__dirname, '../empty_suite_error');
14+
const DIR = path.resolve(__dirname, '../empty-suite-error');
1515

1616
describe('JSON Reporter', () => {
1717
it('fails the test suite if it contains no tests', () => {

0 commit comments

Comments
 (0)