@dudousxd/nestjs-telescope-testing 1.11.0 → 1.12.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-watcher-entries.d.ts","sourceRoot":"","sources":["../src/collect-watcher-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"collect-watcher-entries.d.ts","sourceRoot":"","sources":["../src/collect-watcher-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EAGpB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,6FAA6F;AAC7F,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA2BvF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveConfig, } from '@dudousxd/nestjs-telescope';
|
|
1
|
+
import { captureException, resolveConfig, } from '@dudousxd/nestjs-telescope';
|
|
2
2
|
/** Register `watcher` against a capturing context; returns recorded inputs + the context. */
|
|
3
3
|
export async function collectWatcherEntries(watcher) {
|
|
4
4
|
const recorded = [];
|
|
@@ -8,6 +8,12 @@ export async function collectWatcherEntries(watcher) {
|
|
|
8
8
|
record: (input) => {
|
|
9
9
|
recorded.push(input);
|
|
10
10
|
},
|
|
11
|
+
// Runs the REAL capture (family hash + 4xx skip), so a watcher spec that
|
|
12
|
+
// asserts on the collected entries sees exactly what production would
|
|
13
|
+
// record — including a 4xx HttpException producing nothing at all.
|
|
14
|
+
recordException: (error, details) => {
|
|
15
|
+
captureException((input) => recorded.push(input), error, undefined, details);
|
|
16
|
+
},
|
|
11
17
|
runInBatch: (_origin, fn) => fn(),
|
|
12
18
|
beginBatch: () => ({ id: `batch-${counter++}`, end: () => { } }),
|
|
13
19
|
config,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-watcher-entries.js","sourceRoot":"","sources":["../src/collect-watcher-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,GACd,MAAM,4BAA4B,CAAC;AAOpC,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAgB;IAC1D,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;IACjC,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,MAAM,OAAO,GAAmB;QAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YAChB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QACD,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;QACjC,UAAU,EAAE,GAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;QAC5E,MAAM;QACN,SAAS,EAAE;YACT,GAAG,EAAE,GAAG,EAAE;gBACR,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;YAC7E,CAAC;SACwC;KAC5C,CAAC;IAEF,MAAM,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"collect-watcher-entries.js","sourceRoot":"","sources":["../src/collect-watcher-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EAChB,aAAa,GACd,MAAM,4BAA4B,CAAC;AAOpC,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAgB;IAC1D,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;IACjC,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,MAAM,OAAO,GAAmB;QAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YAChB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QACD,yEAAyE;QACzE,sEAAsE;QACtE,mEAAmE;QACnE,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAClC,gBAAgB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC/E,CAAC;QACD,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;QACjC,UAAU,EAAE,GAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;QAC5E,MAAM;QACN,SAAS,EAAE;YACT,GAAG,EAAE,GAAG,EAAE;gBACR,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;YAC7E,CAAC;SACwC;KAC5C,CAAC;IAEF,MAAM,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-telescope-testing",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Test utilities for @dudousxd/nestjs-telescope — FakeClock, watcher harness, InMemoryStorageProvider re-export.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"README.md"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@dudousxd/nestjs-telescope": "^1.
|
|
28
|
+
"@dudousxd/nestjs-telescope": "^1.27.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^20.0.0",
|
|
32
32
|
"typescript": "^5.4.0",
|
|
33
33
|
"vitest": "^3.0.0",
|
|
34
|
-
"@dudousxd/nestjs-telescope": "1.
|
|
34
|
+
"@dudousxd/nestjs-telescope": "1.27.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=20"
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"build": "tsc -p tsconfig.json",
|
|
47
47
|
"test": "vitest run --passWithNoTests",
|
|
48
48
|
"test:watch": "vitest",
|
|
49
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
49
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.spec.json --noEmit"
|
|
50
50
|
}
|
|
51
51
|
}
|