@zudojs/testing 1.2.3 → 1.3.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/dist/assertions/deepEqual/deepEqual.collections.d.ts +0 -1
- package/dist/assertions/deepEqual/deepEqual.collections.js +0 -1
- package/dist/assertions/deepEqual/deepEqual.core.d.ts +0 -1
- package/dist/assertions/deepEqual/deepEqual.core.js +0 -1
- package/dist/assertions/deepEqual/deepEqual.describe.d.ts +0 -1
- package/dist/assertions/deepEqual/deepEqual.describe.js +0 -1
- package/dist/assertions/deepEqual/deepEqual.identity.d.ts +0 -1
- package/dist/assertions/deepEqual/deepEqual.identity.js +0 -1
- package/dist/assertions/deepEqual/index.d.ts +0 -1
- package/dist/assertions/deepEqual/index.js +0 -1
- package/dist/assertions/errorAssertions.core.d.ts +0 -1
- package/dist/assertions/errorAssertions.core.js +0 -1
- package/dist/assertions/eventAssertions.core.d.ts +0 -1
- package/dist/assertions/eventAssertions.core.js +0 -1
- package/dist/assertions/httpAssertions.core.d.ts +0 -1
- package/dist/assertions/httpAssertions.core.js +0 -1
- package/dist/assertions/index.d.ts +0 -1
- package/dist/assertions/index.js +0 -1
- package/dist/cleanupManager/cleanupManager.core.d.ts +0 -1
- package/dist/cleanupManager/cleanupManager.core.js +0 -1
- package/dist/cleanupManager/index.d.ts +0 -1
- package/dist/cleanupManager/index.js +0 -1
- package/dist/fixtures/eventFixtures.core.d.ts +0 -1
- package/dist/fixtures/eventFixtures.core.js +0 -1
- package/dist/fixtures/index.d.ts +0 -1
- package/dist/fixtures/index.js +0 -1
- package/dist/fixtures/messageFixtures.core.d.ts +0 -1
- package/dist/fixtures/messageFixtures.core.js +0 -1
- package/dist/httpTestClient/httpTestClient.cookieJar.d.ts +0 -1
- package/dist/httpTestClient/httpTestClient.cookieJar.js +0 -1
- package/dist/httpTestClient/httpTestClient.factory.d.ts +0 -1
- package/dist/httpTestClient/httpTestClient.factory.js +0 -1
- package/dist/httpTestClient/httpTestClient.target.d.ts +0 -1
- package/dist/httpTestClient/httpTestClient.target.js +0 -1
- package/dist/httpTestClient/httpTestClient.type.d.ts +0 -1
- package/dist/httpTestClient/httpTestClient.type.js +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.core.d.ts +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.core.js +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.encode.d.ts +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.encode.js +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.execute.d.ts +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.execute.js +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.type.d.ts +0 -1
- package/dist/httpTestClient/httpTestRequest/httpTestRequest.type.js +0 -1
- package/dist/httpTestClient/httpTestRequest/index.d.ts +0 -1
- package/dist/httpTestClient/httpTestRequest/index.js +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.core.d.ts +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.core.js +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.expect.d.ts +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.expect.js +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.match.d.ts +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.match.js +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.type.d.ts +0 -1
- package/dist/httpTestClient/httpTestResponse/httpTestResponse.type.js +0 -1
- package/dist/httpTestClient/httpTestResponse/index.d.ts +0 -1
- package/dist/httpTestClient/httpTestResponse/index.js +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.fetch.d.ts +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.fetch.js +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.node.d.ts +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.node.js +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.server.d.ts +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.server.js +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.type.d.ts +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.type.js +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.zudo.d.ts +0 -1
- package/dist/httpTestClient/httpTestTransport/httpTestTransport.zudo.js +0 -1
- package/dist/httpTestClient/httpTestTransport/index.d.ts +0 -1
- package/dist/httpTestClient/httpTestTransport/index.js +0 -1
- package/dist/httpTestClient/index.d.ts +0 -1
- package/dist/httpTestClient/index.js +0 -1
- package/dist/httpTesting/httpRequest/httpRequest.builder.d.ts +0 -1
- package/dist/httpTesting/httpRequest/httpRequest.builder.js +0 -1
- package/dist/httpTesting/httpRequest/httpRequest.factory.d.ts +0 -1
- package/dist/httpTesting/httpRequest/httpRequest.factory.js +0 -1
- package/dist/httpTesting/httpRequest/httpRequest.type.d.ts +0 -1
- package/dist/httpTesting/httpRequest/httpRequest.type.js +0 -1
- package/dist/httpTesting/httpRequest/index.d.ts +0 -1
- package/dist/httpTesting/httpRequest/index.js +0 -1
- package/dist/httpTesting/httpResponse/httpResponse.core.d.ts +0 -1
- package/dist/httpTesting/httpResponse/httpResponse.core.js +0 -1
- package/dist/httpTesting/httpResponse/httpResponse.helpers.d.ts +0 -1
- package/dist/httpTesting/httpResponse/httpResponse.helpers.js +0 -1
- package/dist/httpTesting/httpResponse/httpResponse.type.d.ts +0 -1
- package/dist/httpTesting/httpResponse/httpResponse.type.js +0 -1
- package/dist/httpTesting/httpResponse/index.d.ts +0 -1
- package/dist/httpTesting/httpResponse/index.js +0 -1
- package/dist/httpTesting/index.d.ts +0 -1
- package/dist/httpTesting/index.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/mocking/index.d.ts +0 -1
- package/dist/mocking/index.js +0 -1
- package/dist/mocking/mockFn.core.d.ts +13 -3
- package/dist/mocking/mockFn.core.js +21 -45
- package/dist/mocking/mockFn.state.d.ts +38 -0
- package/dist/mocking/mockFn.state.js +38 -0
- package/dist/mocking/spy.core.d.ts +0 -1
- package/dist/mocking/spy.core.js +0 -1
- package/dist/mocking/stub.core.d.ts +0 -1
- package/dist/mocking/stub.core.js +0 -1
- package/dist/spyLogger/index.d.ts +0 -1
- package/dist/spyLogger/index.js +0 -1
- package/dist/spyLogger/spyLogger.context.d.ts +0 -1
- package/dist/spyLogger/spyLogger.context.js +0 -1
- package/dist/spyLogger/spyLogger.core.d.ts +0 -1
- package/dist/spyLogger/spyLogger.core.js +0 -1
- package/dist/spyLogger/spyLogger.recording.d.ts +0 -1
- package/dist/spyLogger/spyLogger.recording.js +0 -1
- package/dist/spyLogger/spyLogger.type.d.ts +0 -1
- package/dist/spyLogger/spyLogger.type.js +0 -1
- package/dist/testApplication/index.d.ts +0 -1
- package/dist/testApplication/index.js +0 -1
- package/dist/testApplication/testApplication.core.d.ts +0 -1
- package/dist/testApplication/testApplication.core.js +0 -1
- package/dist/testClock/index.d.ts +0 -1
- package/dist/testClock/index.js +0 -1
- package/dist/testClock/testClock.core.d.ts +0 -1
- package/dist/testClock/testClock.core.js +0 -1
- package/dist/testConfig/index.d.ts +0 -1
- package/dist/testConfig/index.js +0 -1
- package/dist/testConfig/testConfig.core.d.ts +0 -1
- package/dist/testConfig/testConfig.core.js +0 -1
- package/dist/testContainer/index.d.ts +0 -1
- package/dist/testContainer/index.js +0 -1
- package/dist/testContainer/testContainer.core.d.ts +0 -1
- package/dist/testContainer/testContainer.core.js +0 -1
- package/dist/testContext/index.d.ts +0 -1
- package/dist/testContext/index.js +0 -1
- package/dist/testContext/testContext.core.d.ts +0 -1
- package/dist/testContext/testContext.core.js +0 -1
- package/dist/testContext/testContext.recorder.core.d.ts +0 -1
- package/dist/testContext/testContext.recorder.core.js +0 -1
- package/dist/testContext/testContext.recorder.type.d.ts +0 -1
- package/dist/testContext/testContext.recorder.type.js +0 -1
- package/dist/testEventBus/index.d.ts +0 -1
- package/dist/testEventBus/index.js +0 -1
- package/dist/testEventBus/testEventBus.core.d.ts +0 -1
- package/dist/testEventBus/testEventBus.core.js +0 -1
- package/dist/testEventBus/testEventBus.type.d.ts +0 -1
- package/dist/testEventBus/testEventBus.type.js +0 -1
- package/dist/testMessageBus/index.d.ts +0 -1
- package/dist/testMessageBus/index.js +0 -1
- package/dist/testMessageBus/testMessageBus.core.d.ts +0 -1
- package/dist/testMessageBus/testMessageBus.core.js +0 -1
- package/dist/testQueue/index.d.ts +0 -1
- package/dist/testQueue/index.js +0 -1
- package/dist/testQueue/testQueue.core.d.ts +0 -1
- package/dist/testQueue/testQueue.core.js +0 -1
- package/dist/testQueue/testQueue.type.d.ts +0 -1
- package/dist/testQueue/testQueue.type.js +0 -1
- package/dist/testQueue/testQueue.view.d.ts +0 -1
- package/dist/testQueue/testQueue.view.js +0 -1
- package/dist/testSerialization/index.d.ts +0 -1
- package/dist/testSerialization/index.js +0 -1
- package/dist/testSerialization/serializationAssertions.core.d.ts +0 -1
- package/dist/testSerialization/serializationAssertions.core.js +0 -1
- package/dist/testStorage/index.d.ts +0 -1
- package/dist/testStorage/index.js +0 -1
- package/dist/testStorage/testStorageMemory.core.d.ts +0 -1
- package/dist/testStorage/testStorageMemory.core.js +0 -1
- package/package.json +15 -15
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* A mock function that records calls and returns configured values.
|
|
8
|
+
*
|
|
9
|
+
* The `…Once` setters queue a result for the next call only; queued results
|
|
10
|
+
* are consumed in order before the persistent mode (or default) applies.
|
|
8
11
|
*/
|
|
9
12
|
export interface MockFn<TArgs extends readonly unknown[] = unknown[], TResult = unknown> {
|
|
10
13
|
(...args: TArgs): TResult;
|
|
@@ -25,7 +28,17 @@ export interface MockFn<TArgs extends readonly unknown[] = unknown[], TResult =
|
|
|
25
28
|
/** Configures the mock to return a promise rejecting with `error`. */
|
|
26
29
|
mockRejectedValue: (error: unknown) => void;
|
|
27
30
|
mockImplementation: (fn: (...args: TArgs) => TResult) => void;
|
|
31
|
+
/** Returns `value` from the next call only. */
|
|
32
|
+
mockReturnValueOnce: (value: TResult) => void;
|
|
33
|
+
/** Returns a promise resolving to `value` from the next call only. */
|
|
34
|
+
mockResolvedValueOnce: (value: Awaited<TResult>) => void;
|
|
35
|
+
/** Returns a promise rejecting with `error` from the next call only. */
|
|
36
|
+
mockRejectedValueOnce: (error: unknown) => void;
|
|
37
|
+
/** Runs `fn` for the next call only. */
|
|
38
|
+
mockImplementationOnce: (fn: (...args: TArgs) => TResult) => void;
|
|
39
|
+
/** Clears the recording, the persistent mode and any queued one-shots. */
|
|
28
40
|
mockReset: () => void;
|
|
41
|
+
/** Clears the recording only. */
|
|
29
42
|
mockClear: () => void;
|
|
30
43
|
}
|
|
31
44
|
/**
|
|
@@ -39,11 +52,8 @@ export interface MockFn<TArgs extends readonly unknown[] = unknown[], TResult =
|
|
|
39
52
|
* const mockFn = createMockFn<string[], void>();
|
|
40
53
|
*
|
|
41
54
|
* mockFn("hello", "world");
|
|
42
|
-
*
|
|
43
|
-
* expect(mockFn.calls).toHaveLength(1);
|
|
44
55
|
* expect(mockFn.calls[0]).toEqual(["hello", "world"]);
|
|
45
56
|
* expect(mockFn.callCount).toBe(1);
|
|
46
57
|
* ```
|
|
47
58
|
*/
|
|
48
59
|
export declare function createMockFn<TArgs extends readonly unknown[] = unknown[], TResult = unknown>(defaultReturnValue?: TResult): MockFn<TArgs, TResult>;
|
|
49
|
-
//# sourceMappingURL=mockFn.core.d.ts.map
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Creates mock functions that record calls and return configured values.
|
|
5
5
|
*/
|
|
6
|
+
import { defineRecordingProperties, produceResult, } from "./mockFn.state.js";
|
|
6
7
|
/**
|
|
7
8
|
* Creates a mock function.
|
|
8
9
|
*
|
|
@@ -14,8 +15,6 @@
|
|
|
14
15
|
* const mockFn = createMockFn<string[], void>();
|
|
15
16
|
*
|
|
16
17
|
* mockFn("hello", "world");
|
|
17
|
-
*
|
|
18
|
-
* expect(mockFn.calls).toHaveLength(1);
|
|
19
18
|
* expect(mockFn.calls[0]).toEqual(["hello", "world"]);
|
|
20
19
|
* expect(mockFn.callCount).toBe(1);
|
|
21
20
|
* ```
|
|
@@ -24,36 +23,16 @@ export function createMockFn(defaultReturnValue) {
|
|
|
24
23
|
const calls = [];
|
|
25
24
|
const results = [];
|
|
26
25
|
const errors = [];
|
|
26
|
+
const once = [];
|
|
27
27
|
const initialMode = arguments.length > 0
|
|
28
28
|
? { kind: "value", value: defaultReturnValue }
|
|
29
29
|
: { kind: "none" };
|
|
30
30
|
let mode = initialMode;
|
|
31
|
-
/**
|
|
32
|
-
* Produce the configured result.
|
|
33
|
-
*
|
|
34
|
-
* `undefined` is a legitimate configured value, so the mode is tracked
|
|
35
|
-
* explicitly rather than inferred from a `!== undefined` check — which
|
|
36
|
-
* silently ignored `mockReturnValue(undefined)`.
|
|
37
|
-
*/
|
|
38
|
-
const produce = (args) => {
|
|
39
|
-
switch (mode.kind) {
|
|
40
|
-
case "value":
|
|
41
|
-
return mode.value;
|
|
42
|
-
case "resolve":
|
|
43
|
-
return Promise.resolve(mode.value);
|
|
44
|
-
case "reject":
|
|
45
|
-
return Promise.reject(mode.error);
|
|
46
|
-
case "implementation":
|
|
47
|
-
return mode.fn(...args);
|
|
48
|
-
case "none":
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
31
|
const mock = ((...args) => {
|
|
53
32
|
calls.push(args);
|
|
54
33
|
let result;
|
|
55
34
|
try {
|
|
56
|
-
result =
|
|
35
|
+
result = produceResult(once.shift() ?? mode, args);
|
|
57
36
|
}
|
|
58
37
|
catch (error) {
|
|
59
38
|
// Keep `results` aligned with `calls` even when the implementation
|
|
@@ -65,25 +44,10 @@ export function createMockFn(defaultReturnValue) {
|
|
|
65
44
|
results.push(result);
|
|
66
45
|
return result;
|
|
67
46
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Object.defineProperty(mock, "results", {
|
|
73
|
-
get: () => results,
|
|
74
|
-
enumerable: true,
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(mock, "errors", {
|
|
77
|
-
get: () => errors,
|
|
78
|
-
enumerable: true,
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(mock, "invoked", {
|
|
81
|
-
get: () => calls.length > 0,
|
|
82
|
-
enumerable: true,
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(mock, "callCount", {
|
|
85
|
-
get: () => calls.length,
|
|
86
|
-
enumerable: true,
|
|
47
|
+
defineRecordingProperties(mock, { calls, results, errors });
|
|
48
|
+
const implementation = (fn) => ({
|
|
49
|
+
kind: "implementation",
|
|
50
|
+
fn: fn,
|
|
87
51
|
});
|
|
88
52
|
mock.mockReturnValue = (value) => {
|
|
89
53
|
mode = { kind: "value", value };
|
|
@@ -95,12 +59,25 @@ export function createMockFn(defaultReturnValue) {
|
|
|
95
59
|
mode = { kind: "reject", error };
|
|
96
60
|
};
|
|
97
61
|
mock.mockImplementation = (fn) => {
|
|
98
|
-
mode =
|
|
62
|
+
mode = implementation(fn);
|
|
63
|
+
};
|
|
64
|
+
mock.mockReturnValueOnce = (value) => {
|
|
65
|
+
once.push({ kind: "value", value });
|
|
66
|
+
};
|
|
67
|
+
mock.mockResolvedValueOnce = (value) => {
|
|
68
|
+
once.push({ kind: "resolve", value });
|
|
69
|
+
};
|
|
70
|
+
mock.mockRejectedValueOnce = (error) => {
|
|
71
|
+
once.push({ kind: "reject", error });
|
|
72
|
+
};
|
|
73
|
+
mock.mockImplementationOnce = (fn) => {
|
|
74
|
+
once.push(implementation(fn));
|
|
99
75
|
};
|
|
100
76
|
mock.mockReset = () => {
|
|
101
77
|
calls.length = 0;
|
|
102
78
|
results.length = 0;
|
|
103
79
|
errors.length = 0;
|
|
80
|
+
once.length = 0;
|
|
104
81
|
mode = initialMode;
|
|
105
82
|
};
|
|
106
83
|
mock.mockClear = () => {
|
|
@@ -110,4 +87,3 @@ export function createMockFn(defaultReturnValue) {
|
|
|
110
87
|
};
|
|
111
88
|
return mock;
|
|
112
89
|
}
|
|
113
|
-
//# sourceMappingURL=mockFn.core.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result modes and call recording shared by `createMockFn`.
|
|
3
|
+
*/
|
|
4
|
+
/** How a mock produces its result. */
|
|
5
|
+
export type MockMode = {
|
|
6
|
+
readonly kind: "none";
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: "value";
|
|
9
|
+
readonly value: unknown;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "resolve";
|
|
12
|
+
readonly value: unknown;
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: "reject";
|
|
15
|
+
readonly error: unknown;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: "implementation";
|
|
18
|
+
readonly fn: (...args: never[]) => unknown;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Produces the result a mode describes.
|
|
22
|
+
*
|
|
23
|
+
* `undefined` is a legitimate configured value, so the mode is tracked
|
|
24
|
+
* explicitly rather than inferred from a `!== undefined` check — which
|
|
25
|
+
* silently ignored `mockReturnValue(undefined)`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function produceResult<TArgs extends readonly unknown[], TResult>(mode: MockMode, args: TArgs): TResult;
|
|
28
|
+
/** The recorded calls of a mock. */
|
|
29
|
+
export interface MockRecording<TArgs, TResult> {
|
|
30
|
+
readonly calls: TArgs[];
|
|
31
|
+
readonly results: TResult[];
|
|
32
|
+
readonly errors: unknown[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Defines the read-only recording views (`calls`, `results`, `errors`,
|
|
36
|
+
* `invoked`, `callCount`) on a mock function.
|
|
37
|
+
*/
|
|
38
|
+
export declare function defineRecordingProperties<TArgs, TResult>(mock: object, recording: MockRecording<TArgs, TResult>): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result modes and call recording shared by `createMockFn`.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Produces the result a mode describes.
|
|
6
|
+
*
|
|
7
|
+
* `undefined` is a legitimate configured value, so the mode is tracked
|
|
8
|
+
* explicitly rather than inferred from a `!== undefined` check — which
|
|
9
|
+
* silently ignored `mockReturnValue(undefined)`.
|
|
10
|
+
*/
|
|
11
|
+
export function produceResult(mode, args) {
|
|
12
|
+
switch (mode.kind) {
|
|
13
|
+
case "value":
|
|
14
|
+
return mode.value;
|
|
15
|
+
case "resolve":
|
|
16
|
+
return Promise.resolve(mode.value);
|
|
17
|
+
case "reject":
|
|
18
|
+
return Promise.reject(mode.error);
|
|
19
|
+
case "implementation":
|
|
20
|
+
return mode.fn(...args);
|
|
21
|
+
case "none":
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Defines the read-only recording views (`calls`, `results`, `errors`,
|
|
27
|
+
* `invoked`, `callCount`) on a mock function.
|
|
28
|
+
*/
|
|
29
|
+
export function defineRecordingProperties(mock, recording) {
|
|
30
|
+
const define = (name, get) => {
|
|
31
|
+
Object.defineProperty(mock, name, { get, enumerable: true });
|
|
32
|
+
};
|
|
33
|
+
define("calls", () => recording.calls);
|
|
34
|
+
define("results", () => recording.results);
|
|
35
|
+
define("errors", () => recording.errors);
|
|
36
|
+
define("invoked", () => recording.calls.length > 0);
|
|
37
|
+
define("callCount", () => recording.calls.length);
|
|
38
|
+
}
|
package/dist/mocking/spy.core.js
CHANGED
|
@@ -58,4 +58,3 @@ export declare function createStub<T extends object>(overrides?: Partial<T>): T;
|
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
60
|
export declare function createStubClass<T extends object>(OriginalClass: new (...args: never[]) => T, overrides?: Partial<T>): new () => T;
|
|
61
|
-
//# sourceMappingURL=stub.core.d.ts.map
|
|
@@ -6,4 +6,3 @@ export { LEVELS, createRecordingLogger } from "./spyLogger.recording.js";
|
|
|
6
6
|
export type { DerivedOptions, Recorder } from "./spyLogger.recording.js";
|
|
7
7
|
export { deepMatches, mergeContext, mergeLoggerContext, } from "./spyLogger.context.js";
|
|
8
8
|
export type * from "./spyLogger.type.js";
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/spyLogger/index.js
CHANGED
|
@@ -28,4 +28,3 @@ export interface DerivedOptions {
|
|
|
28
28
|
}
|
|
29
29
|
/** Builds a logger over an existing recording. */
|
|
30
30
|
export declare function createRecordingLogger(recorder: Recorder, derived: DerivedOptions, initialLevel: LoggerLevel, initiallyEnabled: boolean): SpyLogger;
|
|
31
|
-
//# sourceMappingURL=spyLogger.recording.d.ts.map
|
|
@@ -97,4 +97,3 @@ export function createRecordingLogger(recorder, derived, initialLevel, initially
|
|
|
97
97
|
findByMetadata: (key, value) => recorder.calls.filter((call) => call.metadata !== undefined && deepMatches(call.metadata[key], value)),
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
//# sourceMappingURL=spyLogger.recording.js.map
|
|
@@ -76,4 +76,3 @@ export interface TestApplication<TLogger extends Logger = Logger> {
|
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
78
|
export declare function createTestApplication<TLogger extends Logger = SpyLogger>(options?: TestApplicationOptions<TLogger>): TestApplication<TLogger>;
|
|
79
|
-
//# sourceMappingURL=testApplication.core.d.ts.map
|
package/dist/testClock/index.js
CHANGED
package/dist/testConfig/index.js
CHANGED
|
@@ -7,4 +7,3 @@ export { createTestContext } from "./testContext.core.js";
|
|
|
7
7
|
export type { TestContext, TestContextOptions } from "./testContext.core.js";
|
|
8
8
|
export type { CapturedLogEntry, CapturedEvent, CapturedMessage, LogRecorder, EventRecorder, MessageRecorder, } from "./testContext.recorder.type.js";
|
|
9
9
|
export { createLogRecorder, createEventRecorder, createMessageRecorder, } from "./testContext.recorder.core.js";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/testQueue/index.js
CHANGED
|
@@ -34,4 +34,3 @@ export declare function assertDeserializesTo<T>(json: string, expected: T, optio
|
|
|
34
34
|
* Useful for testing custom transformers.
|
|
35
35
|
*/
|
|
36
36
|
export declare function assertTypePreservesRoundTrip<T>(value: T, checker: (restored: T) => boolean, description: string): void;
|
|
37
|
-
//# sourceMappingURL=serializationAssertions.core.d.ts.map
|