mirror of https://github.com/facebook/jest.git
chore: rename "integration-tests" to "e2e" (#6315)
* chore: rename integration-tests -> e2e * update changelog
This commit is contained in:
parent
a43fd6c75d
commit
9310e9ce49
13
.eslintrc.js
13
.eslintrc.js
|
@ -44,7 +44,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
files: ['scripts/**/*', 'integration-tests/**/*'],
|
||||
files: ['scripts/**/*', 'e2e/**/*'],
|
||||
rules: {
|
||||
'babel/func-params-comma-dangle': 0,
|
||||
},
|
||||
|
@ -56,14 +56,11 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
excludedFiles: [
|
||||
'integration-tests/__tests__/**/*',
|
||||
'website/versioned_docs/**/*.md',
|
||||
],
|
||||
excludedFiles: ['e2e/__tests__/**/*', 'website/versioned_docs/**/*.md'],
|
||||
files: [
|
||||
'examples/**/*',
|
||||
'scripts/**/*',
|
||||
'integration-tests/*/**/*',
|
||||
'e2e/*/**/*',
|
||||
'website/*/**/*',
|
||||
'eslintImportResolver.js',
|
||||
],
|
||||
|
@ -81,7 +78,7 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
files: [
|
||||
'integration-tests/__tests__/**/*',
|
||||
'e2e/__tests__/**/*',
|
||||
'packages/babel-jest/**/*.test.js',
|
||||
'packages/babel-plugin-jest-hoist/**/*.test.js',
|
||||
'packages/babel-preset-jest/**/*.test.js',
|
||||
|
@ -103,7 +100,7 @@ module.exports = {
|
|||
files: [
|
||||
'website/**',
|
||||
'**/__tests__/**',
|
||||
'integration-tests/**',
|
||||
'e2e/**',
|
||||
'**/pretty-format/perf/**',
|
||||
],
|
||||
rules: {
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
*~
|
||||
/examples/*/node_modules/
|
||||
|
||||
/integration-tests/*/node_modules
|
||||
!/integration-tests/presets/json/node_modules
|
||||
!/integration-tests/presets/js/node_modules
|
||||
/integration-tests/transform/*/coverage
|
||||
/integration-tests/transform/*/node_modules
|
||||
/e2e/*/node_modules
|
||||
!/e2e/presets/json/node_modules
|
||||
!/e2e/presets/js/node_modules
|
||||
/e2e/transform/*/coverage
|
||||
/e2e/transform/*/node_modules
|
||||
|
||||
/node_modules
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
* `[expect]` toMatchObject throws TypeError when a source property is null ([#6313](https://github.com/facebook/jest/pull/6313))
|
||||
* `[jest-cli]` Normalize slashes in paths in CLI output on Windows ((#6310)[https://github.com/facebook/jest/pull/6310])
|
||||
|
||||
### Chore & Maintenance
|
||||
|
||||
* `[filenames]` Rename "integration-tests" to "e2e" ([#6315](https://github.com/facebook/jest/pull/6315))
|
||||
|
||||
## 23.0.1
|
||||
|
||||
### Chore & Maintenance
|
||||
|
|
|
@ -222,7 +222,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover
|
|||
|
||||
### Does snapshot testing only work with React components?
|
||||
|
||||
[React](TutorialReact.md) and [React Native](TutorialReactNative.md) components are a good use case for snapshot testing. However, snapshots can capture any serializable value and should be used anytime the goal is testing whether the output is correct. The Jest repository contains many examples of testing the output of Jest itself, the output of Jest's assertion library as well as log messages from various parts of the Jest codebase. See an example of [snapshotting CLI output](https://github.com/facebook/jest/blob/master/integration-tests/__tests__/console.test.js) in the Jest repo.
|
||||
[React](TutorialReact.md) and [React Native](TutorialReactNative.md) components are a good use case for snapshot testing. However, snapshots can capture any serializable value and should be used anytime the goal is testing whether the output is correct. The Jest repository contains many examples of testing the output of Jest itself, the output of Jest's assertion library as well as log messages from various parts of the Jest codebase. See an example of [snapshotting CLI output](https://github.com/facebook/jest/blob/master/e2e/__tests__/console.test.js) in the Jest repo.
|
||||
|
||||
### What's the difference between snapshot testing and visual regression testing?
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`--listTests flag causes tests to be printed in different lines 1`] = `
|
||||
"/MOCK_ABOLUTE_PATH/e2e/list-tests/__tests__/dummy.test.js
|
||||
/MOCK_ABOLUTE_PATH/e2e/list-tests/__tests__/other.test.js"
|
||||
`;
|
||||
|
||||
exports[`--listTests flag causes tests to be printed out as JSON when using the --json flag 1`] = `"[\\"/MOCK_ABOLUTE_PATH/e2e/list-tests/__tests__/dummy.test.js\\",\\"/MOCK_ABOLUTE_PATH/e2e/list-tests/__tests__/other.test.js\\"]"`;
|
|
@ -51,9 +51,7 @@ test('traverses directory tree up until it finds jest.config', () => {
|
|||
);
|
||||
|
||||
// Snapshot the console.loged `process.cwd()` and make sure it stays the same
|
||||
expect(
|
||||
stdout.replace(/^\W+(.*)integration-tests/gm, '<<REPLACED>>'),
|
||||
).toMatchSnapshot();
|
||||
expect(stdout.replace(/^\W+(.*)e2e/gm, '<<REPLACED>>')).toMatchSnapshot();
|
||||
|
||||
const {rest, summary} = extractSummary(stderr);
|
||||
expect(status).toBe(0);
|
|
@ -16,7 +16,7 @@ describe('JSON Reporter', () => {
|
|||
const outputFileName = 'sum.result.json';
|
||||
const outputFilePath = path.join(
|
||||
process.cwd(),
|
||||
'integration-tests/json-reporter/',
|
||||
'e2e/json-reporter/',
|
||||
outputFileName,
|
||||
);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue