Skip to content

Commit

Permalink
build(docs-infra): update e2e README.md (#1796)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl authored Jul 12, 2020
1 parent d9b62e3 commit a26239e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Directory structure

- `__cases__`: each scenario/minimal repo is in a sub-folder of this one
- `__monorepos__`: each minimal monorepo is in a sub-folder of this one
- `__external-repos__`: each minimal independent project is in a sub-folder of this one
- `__templates__`: contains the package dependency templates for test cases
- `__templates__/default`: is the default template
- `__tests__`: contains the actual tests
Expand Down Expand Up @@ -55,20 +55,20 @@ expect(testCase.run().status).toBe(0);
You can find more information on how to create and use templates [there](./__templates__/README.md).


## Running tests on monorepos
## Running tests on independent projects

You run the monorepo tests with `yarn test:monorepo` (or `npm run test:monorepo)`. In `scripts/test-external-project.js`,
`PROJECTS_TO_RUN` must be modified if a new project is added to `e2e/__monorepos__`.
You run the tests on independent projects with `npm run test:test:external-repos`. In `scripts/lib/paths.js`,
`projectsToRun` must be modified if a new project is added to `e2e/__external-repos__`.

What will happen in order is as follow:
What will happen in order is as following:

1. A bundle (we'll call it `[bundle]`) will be created for `ts-jest` using `npm pack` (`yarn pack` is buggy).

The `prepublish` script will be run, so `clean` and `build` (that is why e2e tests are launched before the others, since it's building as part of the process)
The `prepare` script will be run, so `clean` and `build` (that is why e2e tests are launched before the others, since it's building as part of the process)

2. a sub-folder is created in the main temp dir of the OS, let's refer to it as `[e2e-temp]`
3. `npm ci` and `npm install --save-dev [bundle]` will be run in each monorepo directory in `e2e/__monorepos__` directory.
4. each test suite in each monorepo project are run according to `jest` config of that project.
3. `npm ci` and `npm install --save-dev [bundle]` will be run in each project directory in `e2e/__external-repos__` directory.
4. each test suite in each project are run according to `jest` config of that project.


## Running unit tests and e2e tests
Expand All @@ -77,7 +77,7 @@ You run the E2E tests with `yarn test:e2e` (or `npm run test:e2e`). What will ha

1. A bundle (we'll call it `[bundle]`) will be created for `ts-jest` using `npm pack` (`yarn pack` is buggy).

The `prepublish` script will be run, so `clean` and `build` (that is why e2e tests are launched before the others, since it's building as part of the process)
The `prepare` script will be run, so `clean` and `build` (that is why e2e tests are launched before the others, since it's building as part of the process)

2. a sub-folder is created in the main temp dir of the OS, let's refer to it as `[e2e-temp]`
3. a template directory `[e2e-temp]/__templates__/[xxx]` is created for each `__templates__/[xxx]` by copying files
Expand Down

0 comments on commit a26239e

Please sign in to comment.