@zukhruf/testing 0.3.57 → 0.4.0
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 +5 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -138,7 +138,11 @@ The engine removes a server when it stops, so stopping also removes it. The imag
|
|
|
138
138
|
|
|
139
139
|
## A killed run
|
|
140
140
|
|
|
141
|
-
Disposal cleans up after a test that ends. A test process that is killed (a timeout with `--test-force-exit`, Ctrl-C, an out-of-memory kill) does not dispose its handles. A running container does not stop by itself. Thus Node's global setup and global teardown make the test processes of one `node --test` invocation into one run.
|
|
141
|
+
Disposal cleans up after a test that ends. A test process that is killed (a timeout with `--test-force-exit`, Ctrl-C, an out-of-memory kill) does not dispose its handles. A running container does not stop by itself. Thus Node's global setup and global teardown make the test processes of one `node --test` invocation into one run.
|
|
142
|
+
|
|
143
|
+
In an Nx workspace with the `test` area of `@zukhruf/nx`, give the project the tag `test:docker`. The plugin adds the global setup of this package and `--test-force-exit` to the `test` target of the project. You do not write a file ([`@zukhruf/nx` test area](../nx/README.md#docker-tests)).
|
|
144
|
+
|
|
145
|
+
With no Nx plugin, re-export the two functions from one file in your project:
|
|
142
146
|
|
|
143
147
|
```ts
|
|
144
148
|
// src/testing/docker-global-setup.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zukhruf/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Disposable fixtures for integration tests: Docker containers, database servers, SQLite and DuckDB databases, HTTP servers, streams, temporary directories and intercepted requests. Node's global setup and teardown remove what a killed test run left behind.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"pg": "^8.23.1"
|
|
145
145
|
},
|
|
146
146
|
"dependencies": {
|
|
147
|
-
"@zukhruf/docker": "^0.
|
|
147
|
+
"@zukhruf/docker": "^0.4.0",
|
|
148
148
|
"nano-spawn": "^2.1.0",
|
|
149
149
|
"p-memoize": "^8.0.0",
|
|
150
150
|
"p-retry": "^8.0.1"
|