chore: rename "integration-tests" to "e2e" (#6315)

* chore: rename integration-tests -> e2e

* update changelog
This commit is contained in:
Michał Pierzchała 2018-05-28 00:48:49 +02:00 committed by Simen Bekkhus
parent a43fd6c75d
commit 9310e9ce49
514 changed files with 38 additions and 39 deletions

View File

@ -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: {

10
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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?

View File

@ -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\\"]"`;

View File

@ -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);

View File

@ -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