mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Add Alex to lint documentation (#7852)
* Add Alex to lint documentation * Attempt to trigger GitHub Action * Configure Alex and update docs * More docs updates
This commit is contained in:
@@ -4,11 +4,11 @@ This is an end to end kitchensink test suite, but has multiple usages in it.
|
||||
|
||||
## Running the test suite
|
||||
|
||||
Tests are automatically run by the CI tools.
|
||||
Tests are automatically run by the CI tools.
|
||||
In order to run them locally, without having to manually install and configure everything, the `yarn e2e:docker` CLI command can be used.
|
||||
|
||||
This is a simple script that runs a **Docker** container, where the node version, git branch to clone, test suite, and whether to run it with `yarn` or `npm` can be chosen.
|
||||
Simply run `yarn e2e:docker --help` to get additional info.
|
||||
This is a script that runs a **Docker** container, where the node version, git branch to clone, test suite, and whether to run it with `yarn` or `npm` can be chosen.
|
||||
Run `yarn e2e:docker --help` to get additional info.
|
||||
|
||||
If you need guidance installing **Docker**, you should follow their [official docs](https://docs.docker.com/engine/installation/).
|
||||
|
||||
@@ -28,20 +28,20 @@ Features are categorized by their scope:
|
||||
|
||||
In it's most basic for this serve as a collection of unit tests on a single functionality.
|
||||
|
||||
Unit tests are written in a `src/features/**/*.test.js` file located in the same folder as the feature they test, and usually consist of a simple `ReactDOM.render` call.
|
||||
Unit tests are written in a `src/features/**/*.test.js` file located in the same folder as the feature they test, and usually consist of a `ReactDOM.render` call.
|
||||
|
||||
These tests are run by **jest** and the environment is `test`, so that it resembles how a **Create React App** application is tested.
|
||||
|
||||
### Using it as Integration Tests
|
||||
|
||||
This suite tests how the single features as before behave while development and in production.
|
||||
This suite tests how the single features as before behave while development and in production.
|
||||
A local HTTP server is started, then every single feature is loaded, one by one, to be tested.
|
||||
|
||||
Test are written in `integration/{env|syntax|webpack}.test.js`, depending on their scope.
|
||||
|
||||
For every test case added there is just a little chore to do:
|
||||
For every test case added there is only a little chore to do:
|
||||
|
||||
- a `case` statement must be added in `src/App.js`, which simply perform a dynamic `import()` of the feature
|
||||
- a `case` statement must be added in `src/App.js`, which performs a dynamic `import()` of the feature
|
||||
|
||||
- add a test case in the appropriate integration test file, which calls and awaits `initDOM` with the previous `SwitchCase` string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user