Skip to content

Commit abe4225

Browse files
author
Luca Forstner
committed
Run prettier
1 parent d5a5694 commit abe4225

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

packages/e2e-tests/README.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# E2E Tests
22

3-
E2E tests enable us to verify the behavior of the packages in this repository as if they were to be published in their current state.
3+
E2E tests enable us to verify the behavior of the packages in this repository as if they were to be published in their
4+
current state.
45

56
## How to run
67

@@ -12,17 +13,20 @@ yarn test:e2e
1213

1314
## How they work
1415

15-
Before running any tests we launch a fake test registry (in our case [Verdaccio](https://verdaccio.org/docs/e2e/)), we build our packages, pack them, and publish them to the fake registry.
16-
The fake registry is hosted in a Docker container, and the script to publish the packages is also run from within a container to ensure that the fake publishing happens with the same Node.js and npm versions as we're using in CI.
16+
Before running any tests we launch a fake test registry (in our case [Verdaccio](https://verdaccio.org/docs/e2e/)), we
17+
build our packages, pack them, and publish them to the fake registry. The fake registry is hosted in a Docker container,
18+
and the script to publish the packages is also run from within a container to ensure that the fake publishing happens
19+
with the same Node.js and npm versions as we're using in CI.
1720

18-
After publishing our freshly built packages to the fake registry, the E2E test script will look for `test-recipe.json` files in test applications located in the `test-applications` folder.
19-
In this folder, we keep standalone test applications, that use our SDKs and can be used to verify their behavior.
20-
The `test-recipe.json` recipe files contain information on how to build the test applications and how to run tests on these applications.
21+
After publishing our freshly built packages to the fake registry, the E2E test script will look for `test-recipe.json`
22+
files in test applications located in the `test-applications` folder. In this folder, we keep standalone test
23+
applications, that use our SDKs and can be used to verify their behavior. The `test-recipe.json` recipe files contain
24+
information on how to build the test applications and how to run tests on these applications.
2125

2226
## How to set up a new test
2327

24-
Test applications are completely standalone applications that can be used to verify our SDKs.
25-
To set one up, follow these commands:
28+
Test applications are completely standalone applications that can be used to verify our SDKs. To set one up, follow
29+
these commands:
2630

2731
```sh
2832
cd packages/e2e-tests
@@ -63,15 +67,19 @@ To get you started with the recipe, you can copy the following into `test-recipe
6367
}
6468
```
6569

66-
The `test-recipe.json` files follow a schema (`e2e-tests/test-recipe-schema.json`). Here is a basic explanation of the fields:
70+
The `test-recipe.json` files follow a schema (`e2e-tests/test-recipe-schema.json`). Here is a basic explanation of the
71+
fields:
6772

68-
- The `buildCommand` command runs only once before any of the tests and is supposed to build the test application. If this command returns a non-zero exit code, it counts as a failed test and the test application's tests are not run.
69-
- The `testCommand` command is supposed to run tests on the test application. If the configured command returns a non-zero exit code, it counts as a failed test.
73+
- The `buildCommand` command runs only once before any of the tests and is supposed to build the test application. If
74+
this command returns a non-zero exit code, it counts as a failed test and the test application's tests are not run.
75+
- The `testCommand` command is supposed to run tests on the test application. If the configured command returns a
76+
non-zero exit code, it counts as a failed test.
7077
- A test timeout can be configured via `timeoutSeconds`, it defaults to `60`.
7178

72-
**An important thing to note:** In the context of the `buildCommand` the fake test registry is available at `http://localhost:4873`. It hosts all of our packages as if they were to be published with the state of the current branch.
73-
This means we can install the packages from this registry via the `.npmrc` configuration as seen above.
74-
If you add Sentry dependencies to your test application, you should set the dependency versions set to `*`:
79+
**An important thing to note:** In the context of the `buildCommand` the fake test registry is available at
80+
`http://localhost:4873`. It hosts all of our packages as if they were to be published with the state of the current
81+
branch. This means we can install the packages from this registry via the `.npmrc` configuration as seen above. If you
82+
add Sentry dependencies to your test application, you should set the dependency versions set to `*`:
7583

7684
```jsonc
7785
// package.json

0 commit comments

Comments
 (0)