@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.
Files changed (161) hide show
  1. package/dist/assertions/deepEqual/deepEqual.collections.d.ts +0 -1
  2. package/dist/assertions/deepEqual/deepEqual.collections.js +0 -1
  3. package/dist/assertions/deepEqual/deepEqual.core.d.ts +0 -1
  4. package/dist/assertions/deepEqual/deepEqual.core.js +0 -1
  5. package/dist/assertions/deepEqual/deepEqual.describe.d.ts +0 -1
  6. package/dist/assertions/deepEqual/deepEqual.describe.js +0 -1
  7. package/dist/assertions/deepEqual/deepEqual.identity.d.ts +0 -1
  8. package/dist/assertions/deepEqual/deepEqual.identity.js +0 -1
  9. package/dist/assertions/deepEqual/index.d.ts +0 -1
  10. package/dist/assertions/deepEqual/index.js +0 -1
  11. package/dist/assertions/errorAssertions.core.d.ts +0 -1
  12. package/dist/assertions/errorAssertions.core.js +0 -1
  13. package/dist/assertions/eventAssertions.core.d.ts +0 -1
  14. package/dist/assertions/eventAssertions.core.js +0 -1
  15. package/dist/assertions/httpAssertions.core.d.ts +0 -1
  16. package/dist/assertions/httpAssertions.core.js +0 -1
  17. package/dist/assertions/index.d.ts +0 -1
  18. package/dist/assertions/index.js +0 -1
  19. package/dist/cleanupManager/cleanupManager.core.d.ts +0 -1
  20. package/dist/cleanupManager/cleanupManager.core.js +0 -1
  21. package/dist/cleanupManager/index.d.ts +0 -1
  22. package/dist/cleanupManager/index.js +0 -1
  23. package/dist/fixtures/eventFixtures.core.d.ts +0 -1
  24. package/dist/fixtures/eventFixtures.core.js +0 -1
  25. package/dist/fixtures/index.d.ts +0 -1
  26. package/dist/fixtures/index.js +0 -1
  27. package/dist/fixtures/messageFixtures.core.d.ts +0 -1
  28. package/dist/fixtures/messageFixtures.core.js +0 -1
  29. package/dist/httpTestClient/httpTestClient.cookieJar.d.ts +0 -1
  30. package/dist/httpTestClient/httpTestClient.cookieJar.js +0 -1
  31. package/dist/httpTestClient/httpTestClient.factory.d.ts +0 -1
  32. package/dist/httpTestClient/httpTestClient.factory.js +0 -1
  33. package/dist/httpTestClient/httpTestClient.target.d.ts +0 -1
  34. package/dist/httpTestClient/httpTestClient.target.js +0 -1
  35. package/dist/httpTestClient/httpTestClient.type.d.ts +0 -1
  36. package/dist/httpTestClient/httpTestClient.type.js +0 -1
  37. package/dist/httpTestClient/httpTestRequest/httpTestRequest.core.d.ts +0 -1
  38. package/dist/httpTestClient/httpTestRequest/httpTestRequest.core.js +0 -1
  39. package/dist/httpTestClient/httpTestRequest/httpTestRequest.encode.d.ts +0 -1
  40. package/dist/httpTestClient/httpTestRequest/httpTestRequest.encode.js +0 -1
  41. package/dist/httpTestClient/httpTestRequest/httpTestRequest.execute.d.ts +0 -1
  42. package/dist/httpTestClient/httpTestRequest/httpTestRequest.execute.js +0 -1
  43. package/dist/httpTestClient/httpTestRequest/httpTestRequest.type.d.ts +0 -1
  44. package/dist/httpTestClient/httpTestRequest/httpTestRequest.type.js +0 -1
  45. package/dist/httpTestClient/httpTestRequest/index.d.ts +0 -1
  46. package/dist/httpTestClient/httpTestRequest/index.js +0 -1
  47. package/dist/httpTestClient/httpTestResponse/httpTestResponse.core.d.ts +0 -1
  48. package/dist/httpTestClient/httpTestResponse/httpTestResponse.core.js +0 -1
  49. package/dist/httpTestClient/httpTestResponse/httpTestResponse.expect.d.ts +0 -1
  50. package/dist/httpTestClient/httpTestResponse/httpTestResponse.expect.js +0 -1
  51. package/dist/httpTestClient/httpTestResponse/httpTestResponse.match.d.ts +0 -1
  52. package/dist/httpTestClient/httpTestResponse/httpTestResponse.match.js +0 -1
  53. package/dist/httpTestClient/httpTestResponse/httpTestResponse.type.d.ts +0 -1
  54. package/dist/httpTestClient/httpTestResponse/httpTestResponse.type.js +0 -1
  55. package/dist/httpTestClient/httpTestResponse/index.d.ts +0 -1
  56. package/dist/httpTestClient/httpTestResponse/index.js +0 -1
  57. package/dist/httpTestClient/httpTestTransport/httpTestTransport.fetch.d.ts +0 -1
  58. package/dist/httpTestClient/httpTestTransport/httpTestTransport.fetch.js +0 -1
  59. package/dist/httpTestClient/httpTestTransport/httpTestTransport.node.d.ts +0 -1
  60. package/dist/httpTestClient/httpTestTransport/httpTestTransport.node.js +0 -1
  61. package/dist/httpTestClient/httpTestTransport/httpTestTransport.server.d.ts +0 -1
  62. package/dist/httpTestClient/httpTestTransport/httpTestTransport.server.js +0 -1
  63. package/dist/httpTestClient/httpTestTransport/httpTestTransport.type.d.ts +0 -1
  64. package/dist/httpTestClient/httpTestTransport/httpTestTransport.type.js +0 -1
  65. package/dist/httpTestClient/httpTestTransport/httpTestTransport.zudo.d.ts +0 -1
  66. package/dist/httpTestClient/httpTestTransport/httpTestTransport.zudo.js +0 -1
  67. package/dist/httpTestClient/httpTestTransport/index.d.ts +0 -1
  68. package/dist/httpTestClient/httpTestTransport/index.js +0 -1
  69. package/dist/httpTestClient/index.d.ts +0 -1
  70. package/dist/httpTestClient/index.js +0 -1
  71. package/dist/httpTesting/httpRequest/httpRequest.builder.d.ts +0 -1
  72. package/dist/httpTesting/httpRequest/httpRequest.builder.js +0 -1
  73. package/dist/httpTesting/httpRequest/httpRequest.factory.d.ts +0 -1
  74. package/dist/httpTesting/httpRequest/httpRequest.factory.js +0 -1
  75. package/dist/httpTesting/httpRequest/httpRequest.type.d.ts +0 -1
  76. package/dist/httpTesting/httpRequest/httpRequest.type.js +0 -1
  77. package/dist/httpTesting/httpRequest/index.d.ts +0 -1
  78. package/dist/httpTesting/httpRequest/index.js +0 -1
  79. package/dist/httpTesting/httpResponse/httpResponse.core.d.ts +0 -1
  80. package/dist/httpTesting/httpResponse/httpResponse.core.js +0 -1
  81. package/dist/httpTesting/httpResponse/httpResponse.helpers.d.ts +0 -1
  82. package/dist/httpTesting/httpResponse/httpResponse.helpers.js +0 -1
  83. package/dist/httpTesting/httpResponse/httpResponse.type.d.ts +0 -1
  84. package/dist/httpTesting/httpResponse/httpResponse.type.js +0 -1
  85. package/dist/httpTesting/httpResponse/index.d.ts +0 -1
  86. package/dist/httpTesting/httpResponse/index.js +0 -1
  87. package/dist/httpTesting/index.d.ts +0 -1
  88. package/dist/httpTesting/index.js +0 -1
  89. package/dist/index.d.ts +0 -1
  90. package/dist/index.js +0 -1
  91. package/dist/mocking/index.d.ts +0 -1
  92. package/dist/mocking/index.js +0 -1
  93. package/dist/mocking/mockFn.core.d.ts +13 -3
  94. package/dist/mocking/mockFn.core.js +21 -45
  95. package/dist/mocking/mockFn.state.d.ts +38 -0
  96. package/dist/mocking/mockFn.state.js +38 -0
  97. package/dist/mocking/spy.core.d.ts +0 -1
  98. package/dist/mocking/spy.core.js +0 -1
  99. package/dist/mocking/stub.core.d.ts +0 -1
  100. package/dist/mocking/stub.core.js +0 -1
  101. package/dist/spyLogger/index.d.ts +0 -1
  102. package/dist/spyLogger/index.js +0 -1
  103. package/dist/spyLogger/spyLogger.context.d.ts +0 -1
  104. package/dist/spyLogger/spyLogger.context.js +0 -1
  105. package/dist/spyLogger/spyLogger.core.d.ts +0 -1
  106. package/dist/spyLogger/spyLogger.core.js +0 -1
  107. package/dist/spyLogger/spyLogger.recording.d.ts +0 -1
  108. package/dist/spyLogger/spyLogger.recording.js +0 -1
  109. package/dist/spyLogger/spyLogger.type.d.ts +0 -1
  110. package/dist/spyLogger/spyLogger.type.js +0 -1
  111. package/dist/testApplication/index.d.ts +0 -1
  112. package/dist/testApplication/index.js +0 -1
  113. package/dist/testApplication/testApplication.core.d.ts +0 -1
  114. package/dist/testApplication/testApplication.core.js +0 -1
  115. package/dist/testClock/index.d.ts +0 -1
  116. package/dist/testClock/index.js +0 -1
  117. package/dist/testClock/testClock.core.d.ts +0 -1
  118. package/dist/testClock/testClock.core.js +0 -1
  119. package/dist/testConfig/index.d.ts +0 -1
  120. package/dist/testConfig/index.js +0 -1
  121. package/dist/testConfig/testConfig.core.d.ts +0 -1
  122. package/dist/testConfig/testConfig.core.js +0 -1
  123. package/dist/testContainer/index.d.ts +0 -1
  124. package/dist/testContainer/index.js +0 -1
  125. package/dist/testContainer/testContainer.core.d.ts +0 -1
  126. package/dist/testContainer/testContainer.core.js +0 -1
  127. package/dist/testContext/index.d.ts +0 -1
  128. package/dist/testContext/index.js +0 -1
  129. package/dist/testContext/testContext.core.d.ts +0 -1
  130. package/dist/testContext/testContext.core.js +0 -1
  131. package/dist/testContext/testContext.recorder.core.d.ts +0 -1
  132. package/dist/testContext/testContext.recorder.core.js +0 -1
  133. package/dist/testContext/testContext.recorder.type.d.ts +0 -1
  134. package/dist/testContext/testContext.recorder.type.js +0 -1
  135. package/dist/testEventBus/index.d.ts +0 -1
  136. package/dist/testEventBus/index.js +0 -1
  137. package/dist/testEventBus/testEventBus.core.d.ts +0 -1
  138. package/dist/testEventBus/testEventBus.core.js +0 -1
  139. package/dist/testEventBus/testEventBus.type.d.ts +0 -1
  140. package/dist/testEventBus/testEventBus.type.js +0 -1
  141. package/dist/testMessageBus/index.d.ts +0 -1
  142. package/dist/testMessageBus/index.js +0 -1
  143. package/dist/testMessageBus/testMessageBus.core.d.ts +0 -1
  144. package/dist/testMessageBus/testMessageBus.core.js +0 -1
  145. package/dist/testQueue/index.d.ts +0 -1
  146. package/dist/testQueue/index.js +0 -1
  147. package/dist/testQueue/testQueue.core.d.ts +0 -1
  148. package/dist/testQueue/testQueue.core.js +0 -1
  149. package/dist/testQueue/testQueue.type.d.ts +0 -1
  150. package/dist/testQueue/testQueue.type.js +0 -1
  151. package/dist/testQueue/testQueue.view.d.ts +0 -1
  152. package/dist/testQueue/testQueue.view.js +0 -1
  153. package/dist/testSerialization/index.d.ts +0 -1
  154. package/dist/testSerialization/index.js +0 -1
  155. package/dist/testSerialization/serializationAssertions.core.d.ts +0 -1
  156. package/dist/testSerialization/serializationAssertions.core.js +0 -1
  157. package/dist/testStorage/index.d.ts +0 -1
  158. package/dist/testStorage/index.js +0 -1
  159. package/dist/testStorage/testStorageMemory.core.d.ts +0 -1
  160. package/dist/testStorage/testStorageMemory.core.js +0 -1
  161. 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 = produce(args);
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
- Object.defineProperty(mock, "calls", {
69
- get: () => calls,
70
- enumerable: true,
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 = { kind: "implementation", fn: fn };
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
+ }
@@ -77,4 +77,3 @@ export interface SpyMethod<TObj, TMethod extends keyof TObj> {
77
77
  * ```
78
78
  */
79
79
  export declare function createSpyMethod<TObj, TMethod extends keyof TObj>(object: TObj, property: TMethod): SpyMethod<TObj, TMethod>;
80
- //# sourceMappingURL=spy.core.d.ts.map
@@ -124,4 +124,3 @@ export function createSpyMethod(object, property) {
124
124
  },
125
125
  };
126
126
  }
127
- //# sourceMappingURL=spy.core.js.map
@@ -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
@@ -133,4 +133,3 @@ export function createStubClass(OriginalClass, overrides = {}) {
133
133
  Object.setPrototypeOf(Stub, OriginalClass);
134
134
  return Stub;
135
135
  }
136
- //# sourceMappingURL=stub.core.js.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
@@ -4,4 +4,3 @@
4
4
  export { createSpyLogger } from "./spyLogger.core.js";
5
5
  export { LEVELS, createRecordingLogger } from "./spyLogger.recording.js";
6
6
  export { deepMatches, mergeContext, mergeLoggerContext, } from "./spyLogger.context.js";
7
- //# sourceMappingURL=index.js.map
@@ -24,4 +24,3 @@ export declare function mergeContext(context: LoggerContext | undefined, metadat
24
24
  * and miss what it should find.
25
25
  */
26
26
  export declare function deepMatches(actual: unknown, expected: unknown): boolean;
27
- //# sourceMappingURL=spyLogger.context.d.ts.map
@@ -41,4 +41,3 @@ export function mergeContext(context, metadata) {
41
41
  export function deepMatches(actual, expected) {
42
42
  return deepEqual(actual, expected);
43
43
  }
44
- //# sourceMappingURL=spyLogger.context.js.map
@@ -19,4 +19,3 @@ import type { SpyLogger } from "./spyLogger.type.js";
19
19
  * @returns A SpyLogger instance.
20
20
  */
21
21
  export declare function createSpyLogger(name?: string, level?: LoggerLevel): SpyLogger;
22
- //# sourceMappingURL=spyLogger.core.d.ts.map
@@ -20,4 +20,3 @@ import { LEVELS, createRecordingLogger } from "./spyLogger.recording.js";
20
20
  export function createSpyLogger(name = "test", level = LEVELS.trace) {
21
21
  return createRecordingLogger({ calls: [] }, { name }, level, true);
22
22
  }
23
- //# sourceMappingURL=spyLogger.core.js.map
@@ -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
@@ -20,4 +20,3 @@ export interface SpyLogger extends Logger {
20
20
  findByMessage: (substring: string) => readonly LogCall[];
21
21
  findByMetadata: (key: string, value: unknown) => readonly LogCall[];
22
22
  }
23
- //# sourceMappingURL=spyLogger.type.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Types for the spy logger used in testing.
5
5
  */
6
6
  export {};
7
- //# sourceMappingURL=spyLogger.type.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestApplication, DEFAULT_TEST_APPLICATION_TIME, } from "./testApplication.core.js";
7
7
  export type { TestApplication, TestApplicationOptions, } from "./testApplication.core.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Simplified test application context creation.
5
5
  */
6
6
  export { createTestApplication, DEFAULT_TEST_APPLICATION_TIME, } from "./testApplication.core.js";
7
- //# sourceMappingURL=index.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
@@ -66,4 +66,3 @@ export function createTestApplication(options = {}) {
66
66
  dispose,
67
67
  };
68
68
  }
69
- //# sourceMappingURL=testApplication.core.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestClock } from "./testClock.core.js";
7
7
  export type { TestClock } from "./testClock.core.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Control time in tests without real delays.
5
5
  */
6
6
  export { createTestClock } from "./testClock.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -51,4 +51,3 @@ export interface TestClock {
51
51
  * ```
52
52
  */
53
53
  export declare function createTestClock(initialTime?: Date | string | number): TestClock;
54
- //# sourceMappingURL=testClock.core.d.ts.map
@@ -76,4 +76,3 @@ export function createTestClock(initialTime) {
76
76
  reset,
77
77
  };
78
78
  }
79
- //# sourceMappingURL=testClock.core.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestConfigManager } from "./testConfig.core.js";
7
7
  export type { TestConfigManager } from "./testConfig.core.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Wraps ConfigManager with test-friendly defaults.
5
5
  */
6
6
  export { createTestConfigManager } from "./testConfig.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -55,4 +55,3 @@ export interface TestConfigManager {
55
55
  * ```
56
56
  */
57
57
  export declare function createTestConfigManager(initialValues?: Readonly<Record<string, ConfigValue>>, options?: Partial<ConfigManagerOptions>): TestConfigManager;
58
- //# sourceMappingURL=testConfig.core.d.ts.map
@@ -50,4 +50,3 @@ export function createTestConfigManager(initialValues = {}, options = {}) {
50
50
  dispose,
51
51
  };
52
52
  }
53
- //# sourceMappingURL=testConfig.core.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestContainer } from "./testContainer.core.js";
7
7
  export type { DependencyOverride, TestContainer, TestContainerOptions, } from "./testContainer.core.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Pre-started containers with override support.
5
5
  */
6
6
  export { createTestContainer } from "./testContainer.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -57,4 +57,3 @@ export interface TestContainer {
57
57
  * ```
58
58
  */
59
59
  export declare function createTestContainer(options?: TestContainerOptions): TestContainer;
60
- //# sourceMappingURL=testContainer.core.d.ts.map
@@ -44,4 +44,3 @@ export function createTestContainer(options = {}) {
44
44
  dispose,
45
45
  };
46
46
  }
47
- //# sourceMappingURL=testContainer.core.js.map
@@ -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
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestContext } from "./testContext.core.js";
7
7
  export { createLogRecorder, createEventRecorder, createMessageRecorder, } from "./testContext.recorder.core.js";
8
- //# sourceMappingURL=index.js.map
@@ -29,4 +29,3 @@ export interface TestContext {
29
29
  * @returns A TestContext instance.
30
30
  */
31
31
  export declare function createTestContext(options?: TestContextOptions): TestContext;
32
- //# sourceMappingURL=testContext.core.d.ts.map
@@ -25,4 +25,3 @@ export function createTestContext(options = {}) {
25
25
  };
26
26
  return { clock, cleanup, logs, events, messages, dispose };
27
27
  }
28
- //# sourceMappingURL=testContext.core.js.map
@@ -16,4 +16,3 @@ export declare function createEventRecorder(): EventRecorder;
16
16
  * Creates a message recorder that captures messages.
17
17
  */
18
18
  export declare function createMessageRecorder(): MessageRecorder;
19
- //# sourceMappingURL=testContext.recorder.core.d.ts.map
@@ -71,4 +71,3 @@ export function createMessageRecorder() {
71
71
  findByType: (type) => entries.filter((e) => e.type === type),
72
72
  };
73
73
  }
74
- //# sourceMappingURL=testContext.recorder.core.js.map
@@ -56,4 +56,3 @@ export interface MessageRecorder {
56
56
  clear: () => void;
57
57
  findByType: (type: string) => readonly CapturedMessage[];
58
58
  }
59
- //# sourceMappingURL=testContext.recorder.type.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Types for log, event, and message recorders used in test contexts.
5
5
  */
6
6
  export {};
7
- //# sourceMappingURL=testContext.recorder.type.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestEventBus } from "./testEventBus.core.js";
7
7
  export type { RecordedEvent, TestEventBus } from "./testEventBus.type.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * A real EventBus that records every publication.
5
5
  */
6
6
  export { createTestEventBus } from "./testEventBus.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -25,4 +25,3 @@ export type { RecordedEvent, TestEventBus } from "./testEventBus.type.js";
25
25
  * ```
26
26
  */
27
27
  export declare function createTestEventBus(options?: EventBusOptions): TestEventBus;
28
- //# sourceMappingURL=testEventBus.core.d.ts.map
@@ -70,4 +70,3 @@ export function createTestEventBus(options = {}) {
70
70
  bus.start();
71
71
  return bus;
72
72
  }
73
- //# sourceMappingURL=testEventBus.core.js.map
@@ -37,4 +37,3 @@ export interface TestEventBus extends EventBus {
37
37
  */
38
38
  clear(): void;
39
39
  }
40
- //# sourceMappingURL=testEventBus.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=testEventBus.type.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestMessageBus } from "./testMessageBus.core.js";
7
7
  export type { RecordedMessage, TestMessageBus } from "./testMessageBus.core.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * A real MessageBus that records every dispatch.
5
5
  */
6
6
  export { createTestMessageBus } from "./testMessageBus.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -54,4 +54,3 @@ export interface TestMessageBus extends MessageBus {
54
54
  * ```
55
55
  */
56
56
  export declare function createTestMessageBus(options?: MessageBusOptions): TestMessageBus;
57
- //# sourceMappingURL=testMessageBus.core.d.ts.map
@@ -59,4 +59,3 @@ class RecordingMessageBus extends InMemoryMessageBus {
59
59
  export function createTestMessageBus(options = {}) {
60
60
  return new RecordingMessageBus(options);
61
61
  }
62
- //# sourceMappingURL=testMessageBus.core.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createTestQueue } from "./testQueue.core.js";
7
7
  export type { RecordedJob, TestQueue } from "./testQueue.type.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * A `Queue` backed by a real InMemoryQueue that records every job added.
5
5
  */
6
6
  export { createTestQueue } from "./testQueue.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -24,4 +24,3 @@ export type { RecordedJob, TestQueue } from "./testQueue.type.js";
24
24
  * ```
25
25
  */
26
26
  export declare function createTestQueue<TData = unknown>(name: QueueName, options?: QueueOptions): TestQueue<TData>;
27
- //# sourceMappingURL=testQueue.core.d.ts.map
@@ -39,4 +39,3 @@ export function createTestQueue(name, options) {
39
39
  });
40
40
  return new RecordingQueueView(queue, recorded);
41
41
  }
42
- //# sourceMappingURL=testQueue.core.js.map
@@ -27,4 +27,3 @@ export interface TestQueue<TData = unknown> extends Queue<TData> {
27
27
  */
28
28
  clear(): void;
29
29
  }
30
- //# sourceMappingURL=testQueue.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=testQueue.type.js.map
@@ -34,4 +34,3 @@ export declare class RecordingQueueView<TData> implements TestQueue<TData> {
34
34
  readonly setAutoProcess: (enabled: boolean) => void;
35
35
  }
36
36
  export {};
37
- //# sourceMappingURL=testQueue.view.d.ts.map
@@ -41,4 +41,3 @@ export class RecordingQueueView {
41
41
  onJobReady = (listener) => this.queue.onJobReady(listener);
42
42
  setAutoProcess = (enabled) => this.queue.setAutoProcess(enabled);
43
43
  }
44
- //# sourceMappingURL=testQueue.view.js.map
@@ -4,4 +4,3 @@
4
4
  * Assertions for testing serialization round-trips and type preservation.
5
5
  */
6
6
  export { assertSerializesCorrectly, assertSerializesTo, assertDeserializesTo, assertTypePreservesRoundTrip, } from "./serializationAssertions.core.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Assertions for testing serialization round-trips and type preservation.
5
5
  */
6
6
  export { assertSerializesCorrectly, assertSerializesTo, assertDeserializesTo, assertTypePreservesRoundTrip, } from "./serializationAssertions.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -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
@@ -74,4 +74,3 @@ export function assertTypePreservesRoundTrip(value, checker, description) {
74
74
  throw new Error(`Type preservation failed for ${description}: ${describeValue(value)} → ${describeValue(restored)}`);
75
75
  }
76
76
  }
77
- //# sourceMappingURL=serializationAssertions.core.js.map
@@ -4,4 +4,3 @@
4
4
  * In-memory storage adapter for testing without external dependencies.
5
5
  */
6
6
  export { InMemoryTestStorage } from "./testStorageMemory.core.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * In-memory storage adapter for testing without external dependencies.
5
5
  */
6
6
  export { InMemoryTestStorage } from "./testStorageMemory.core.js";
7
- //# sourceMappingURL=index.js.map
@@ -46,4 +46,3 @@ export declare class InMemoryTestStorage {
46
46
  /** Get the number of live entries. */
47
47
  get size(): number;
48
48
  }
49
- //# sourceMappingURL=testStorageMemory.core.d.ts.map
@@ -78,4 +78,3 @@ export class InMemoryTestStorage {
78
78
  return this.keys().length;
79
79
  }
80
80
  }
81
- //# sourceMappingURL=testStorageMemory.core.js.map