@tramvai/test-integration-jest 1.46.7 → 1.46.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Tramvai test integration jest
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Jest preset for integration-testing
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> `@tramvai/cli` and `puppeteer` should be installed separately
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm i --save-dev @tramvai/test-integration-jest
|
|
@@ -12,11 +12,11 @@ npm i --save-dev @tramvai/test-integration-jest
|
|
|
12
12
|
|
|
13
13
|
## How To
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Debug and development of integration tests in Jest
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Using this jest preset you can run integration tests in watch mode. In this case, application itself will be launched only once and will work in background.
|
|
18
18
|
|
|
19
|
-
1.
|
|
19
|
+
1. Add preset `@tramvai/test-integration-jest` to `jest.integration.config.js`:
|
|
20
20
|
|
|
21
21
|
```js
|
|
22
22
|
module.exports = {
|
|
@@ -24,7 +24,7 @@ npm i --save-dev @tramvai/test-integration-jest
|
|
|
24
24
|
};
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
2.
|
|
27
|
+
2. Add new script for running tests in watch mode to `package.json`:
|
|
28
28
|
|
|
29
29
|
```json
|
|
30
30
|
{
|
|
@@ -35,11 +35,11 @@ npm i --save-dev @tramvai/test-integration-jest
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
3.
|
|
38
|
+
3. Run some test with `yarn test:integration:watch <path_to_test>`. In this case you are able to go to local url `http://localhost:3000` and see application at work.
|
|
39
39
|
|
|
40
|
-
###
|
|
40
|
+
### Environment for Jest
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Minimal set of dependencies for running `jest`:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
npm i --save-dev jest @types/jest jest-circus
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-integration-jest",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"@jest/types": "^27.0.2",
|
|
20
20
|
"@swc-node/jest": "^1.3.3",
|
|
21
21
|
"@tinkoff/utils": "^2.1.2",
|
|
22
|
-
"@tramvai/test-puppeteer": "1.46.
|
|
22
|
+
"@tramvai/test-puppeteer": "1.46.8",
|
|
23
23
|
"jest-environment-node": "^27.0.3",
|
|
24
24
|
"jest-watcher": "^27.0.2",
|
|
25
25
|
"tslib": "^2.0.3",
|
|
26
26
|
"utility-types": "^3.10.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@tramvai/cli": "1.46.
|
|
29
|
+
"@tramvai/cli": "1.46.8",
|
|
30
30
|
"puppeteer": "10.0.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {},
|