Skip to content

Commit 10276f9

Browse files
Michael Baldwincpojer
authored andcommitted
Standardize file names in integration-tests (#5513)
* standardize file names in integration-tests - updated tests - added to changelog * remove filename lint rule since multiple styles are not supported * remove unicorn completely
1 parent 4ca959b commit 10276f9

97 files changed

Lines changed: 116 additions & 199 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = {
3333
'react/jsx-no-undef': 0,
3434
'react/react-in-jsx-scope': 0,
3535
'sort-keys': 0,
36-
'unicorn/filename-case': 0,
3736
},
3837
},
3938
{
@@ -42,44 +41,18 @@ module.exports = {
4241
'babel/func-params-comma-dangle': 0,
4342
'import/no-unresolved': [2, {ignore: ['^react-native$']}],
4443
'import/order': 0,
45-
'unicorn/filename-case': 0,
4644
},
4745
},
4846
{
4947
files: ['scripts/**/*', 'integration-tests/**/*'],
5048
rules: {
5149
'babel/func-params-comma-dangle': 0,
52-
'unicorn/filename-case': 0,
5350
},
5451
},
5552
{
5653
files: 'types/**/*',
5754
rules: {
5855
'import/no-extraneous-dependencies': 0,
59-
'unicorn/filename-case': 0,
60-
},
61-
},
62-
{
63-
files: [
64-
'**/__mocks__/**/*',
65-
'website/**/*',
66-
'**/jest-runtime/**/*',
67-
'**/src/Console*',
68-
'packages/jest-cli/src/lib/Prompt.js',
69-
'packages/jest-cli/src/reporters/Status.js',
70-
'packages/jest-editor-support/src/Process.js',
71-
'packages/jest-editor-support/src/Runner.js',
72-
'packages/jest-editor-support/src/Settings.js',
73-
'packages/jest-editor-support/src/Snapshot.js',
74-
'packages/jest-editor-support/src/__tests__/Snapshot-test.js',
75-
'packages/jest-jasmine2/src/jasmine/Env.js',
76-
'packages/jest-jasmine2/src/jasmine/Spec.js',
77-
'packages/jest-jasmine2/src/jasmine/Suite.js',
78-
'packages/jest-jasmine2/src/jasmine/Timer.js',
79-
'packages/jest-snapshot/src/State.js',
80-
],
81-
rules: {
82-
'unicorn/filename-case': 0,
8356
},
8457
},
8558
{
@@ -136,7 +109,7 @@ module.exports = {
136109
},
137110
],
138111
parser: 'babel-eslint',
139-
plugins: ['markdown', 'import', 'unicorn', 'prettier'],
112+
plugins: ['markdown', 'import', 'prettier'],
140113
rules: {
141114
'flowtype/boolean-style': 2,
142115
'flowtype/no-primitive-constructor-types': 2,
@@ -168,7 +141,6 @@ module.exports = {
168141
trailingComma: 'all',
169142
},
170143
],
171-
'unicorn/filename-case': [1, {case: 'snakeCase'}],
172144
},
173145
settings: {
174146
'import/resolver': {

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
* `[jest-config]` Allow `<rootDir>` to be used with `collectCoverageFrom`
2828
([#5524](https://github.com/facebook/jest/pull/5524))
29+
* `[filenames]` Standardize files names in "integration-tests" folder ([#5513](https://github.com/facebook/jest/pull/5513))
30+
2931

3032
## jest 22.2.2
3133

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
66
---------------|----------|----------|----------|----------|----------------|
77
All files | 100 | 100 | 100 | 100 | |
88
a | 100 | 100 | 100 | 100 | |
9-
identical.js | 100 | 100 | 100 | 100 | |
9+
Identical.js | 100 | 100 | 100 | 100 | |
1010
b | 100 | 100 | 100 | 100 | |
11-
identical.js | 100 | 100 | 100 | 100 | |
11+
Identical.js | 100 | 100 | 100 | 100 | |
1212
---------------|----------|----------|----------|----------|----------------|
1313
"
1414
`;
1515

1616
exports[`collects coverage only from multiple specified files 1`] = `
17-
"---------------|----------|----------|----------|----------|----------------|
18-
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
19-
---------------|----------|----------|----------|----------|----------------|
20-
All files | 100 | 100 | 100 | 100 | |
21-
other-file.js | 100 | 100 | 100 | 100 | |
22-
setup.js | 100 | 100 | 100 | 100 | |
23-
---------------|----------|----------|----------|----------|----------------|
17+
"--------------|----------|----------|----------|----------|----------------|
18+
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
19+
--------------|----------|----------|----------|----------|----------------|
20+
All files | 100 | 100 | 100 | 100 | |
21+
OtherFile.js | 100 | 100 | 100 | 100 | |
22+
setup.js | 100 | 100 | 100 | 100 | |
23+
--------------|----------|----------|----------|----------|----------------|
2424
"
2525
`;
2626

@@ -39,7 +39,7 @@ exports[`collects coverage only from specified files avoiding dependencies 1`] =
3939
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
4040
----------|----------|----------|----------|----------|----------------|
4141
All files | 85.71 | 100 | 50 | 85.71 | |
42-
sum.js | 85.71 | 100 | 50 | 85.71 | 12 |
42+
Sum.js | 85.71 | 100 | 50 | 85.71 | 12 |
4343
----------|----------|----------|----------|----------|----------------|
4444
"
4545
`;
@@ -59,14 +59,14 @@ File | % Stmts | % Branch | % Funcs | % Lines
5959
-------------------------------------|----------|----------|----------|----------|----------------|
6060
All files | 56.52 | 0 | 50 | 56.52 | |
6161
coverage-report | 41.18 | 0 | 25 | 41.18 | |
62-
not-required-in-test-suite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
63-
other-file.js | 100 | 100 | 100 | 100 | |
64-
sum.js | 85.71 | 100 | 50 | 85.71 | 12 |
65-
sum_dependency.js | 0 | 0 | 0 | 0 | 8,10,11,14 |
62+
OtherFile.js | 100 | 100 | 100 | 100 | |
63+
Sum.js | 85.71 | 100 | 50 | 85.71 | 12 |
64+
SumDependency.js | 0 | 0 | 0 | 0 | 8,10,11,14 |
65+
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8,15,16,17,19 |
6666
coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | |
67-
identical.js | 100 | 100 | 100 | 100 | |
67+
Identical.js | 100 | 100 | 100 | 100 | |
6868
coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | |
69-
identical.js | 100 | 100 | 100 | 100 | |
69+
Identical.js | 100 | 100 | 100 | 100 | |
7070
-------------------------------------|----------|----------|----------|----------|----------------|
7171
"
7272
`;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`babel-jest instruments only specific files and collects coverage 1`] =
55
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
66
------------|----------|----------|----------|----------|----------------|
77
All files | 83.33 | 100 | 50 | 83.33 | |
8-
covered.js | 83.33 | 100 | 50 | 83.33 | 15 |
8+
Covered.js | 83.33 | 100 | 50 | 83.33 | 15 |
99
------------|----------|----------|----------|----------|----------------|
1010
"
1111
`;
@@ -24,7 +24,7 @@ exports[`no babel-jest instrumentation with no babel-jest 1`] = `
2424
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
2525
------------|----------|----------|----------|----------|----------------|
2626
All files | 83.33 | 100 | 50 | 83.33 | |
27-
covered.js | 83.33 | 100 | 50 | 83.33 | 15 |
27+
Covered.js | 83.33 | 100 | 50 | 83.33 | 15 |
2828
------------|----------|----------|----------|----------|----------------|
2929
"
3030
`;

integration-tests/__tests__/babel_plugin_jest_hoist.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'use strict';
1010

1111
const path = require('path');
12-
const {run} = require('../utils');
12+
const {run} = require('../Utils');
1313
const runJest = require('../runJest');
1414

1515
const DIR = path.resolve(__dirname, '..', 'babel-plugin-jest-hoist');

integration-tests/__tests__/cli-accepts-exact-filenames.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
const path = require('path');
1313
const SkipOnWindows = require('../../scripts/SkipOnWindows');
14-
const {extractSummary, cleanup, writeFiles} = require('../utils');
14+
const {extractSummary, cleanup, writeFiles} = require('../Utils');
1515
const runJest = require('../runJest');
1616

1717
const DIR = path.resolve(__dirname, '../cli_accepts_exact_filenames');

integration-tests/__tests__/console.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'use strict';
1111

1212
const SkipOnWindows = require('../../scripts/SkipOnWindows');
13-
const {extractSummary} = require('../utils');
13+
const {extractSummary} = require('../Utils');
1414
const runJest = require('../runJest');
1515

1616
SkipOnWindows.suite();

integration-tests/__tests__/console_log_output_when_run_in_band.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
const path = require('path');
1313
const SkipOnWindows = require('../../scripts/SkipOnWindows');
14-
const {extractSummary, cleanup, writeFiles} = require('../utils');
14+
const {extractSummary, cleanup, writeFiles} = require('../Utils');
1515
const runJest = require('../runJest');
1616

1717
const DIR = path.resolve(__dirname, '../console_log_output_when_run_in_band');

integration-tests/__tests__/coverage_remapping.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
const {readFileSync} = require('fs');
1313
const path = require('path');
1414
const SkipOnWindows = require('../../scripts/SkipOnWindows');
15-
const {cleanup, run} = require('../utils');
15+
const {cleanup, run} = require('../Utils');
1616
const runJest = require('../runJest');
1717

1818
const dir = path.resolve(__dirname, '../coverage-remapping');

0 commit comments

Comments
 (0)