@dunx/testing 3.1.3 → 3.2.1
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 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
The container an app already has, with named bindings **replaced in place**, plus
|
|
4
4
|
a real `Bun.serve` on port 0. Bun binds a socket in about a millisecond, so the
|
|
5
|
-
thing under test is the thing that ships
|
|
6
|
-
request object and no in-memory transport.
|
|
5
|
+
thing under test is the thing that ships. There is no mocking framework, no fake
|
|
6
|
+
request object, and no in-memory transport.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -51,10 +51,10 @@ The [Testing guide](../../docs/guide/11-testing.md) is canonical.
|
|
|
51
51
|
stubbing `Logger` need not know how many modules bind it. Naming a token
|
|
52
52
|
nobody binds is an error rather than a silent no-op.
|
|
53
53
|
- The replacement happens before anything resolves, so the discarded provider is
|
|
54
|
-
never constructed: its `useFactory` never runs and its `onInit` never fires
|
|
55
|
-
|
|
54
|
+
never constructed: its `useFactory` never runs and its `onInit` never fires.
|
|
55
|
+
That makes overriding a database safe.
|
|
56
56
|
- Request logging and boot logging are off unless asked for.
|
|
57
|
-
- An `HttpOptions` field not passed
|
|
57
|
+
- An `HttpOptions` field not passed stays absent. Nothing is inherited from
|
|
58
58
|
production. `middleware` and `onError` change what the application does, so
|
|
59
59
|
pass the same object `main.ts` passes.
|
|
60
60
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dunx/testing",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Test harness for dunx apps: a container with providers replaced in place, and a real Bun.serve on port 0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@dunx/http": "workspace:*"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@dunx/core": "^3.1
|
|
55
|
-
"@dunx/http": "^3.1
|
|
54
|
+
"@dunx/core": "^3.2.1",
|
|
55
|
+
"@dunx/http": "^3.2.1",
|
|
56
56
|
"@types/bun": ">=1.3.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|