@spoosh/test-utils 0.1.6 → 0.1.8

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/index.cjs CHANGED
@@ -51,9 +51,9 @@ function createMockContext(options = {}) {
51
51
  operationType = "read",
52
52
  pluginOptions,
53
53
  forceRefetch,
54
- hookId,
54
+ instanceId,
55
55
  request = {},
56
- metadata = /* @__PURE__ */ new Map(),
56
+ temp = /* @__PURE__ */ new Map(),
57
57
  plugins = { get: import_vitest.vi.fn() }
58
58
  } = options;
59
59
  return {
@@ -64,13 +64,13 @@ function createMockContext(options = {}) {
64
64
  tags,
65
65
  requestTimestamp: Date.now(),
66
66
  request,
67
- metadata,
67
+ temp,
68
68
  stateManager,
69
69
  eventEmitter,
70
70
  plugins,
71
71
  pluginOptions,
72
72
  forceRefetch,
73
- hookId
73
+ instanceId
74
74
  };
75
75
  }
76
76
  function createMockResponse(overrides = {}) {
package/dist/index.d.cts CHANGED
@@ -16,11 +16,11 @@ type MockContextOptions<TData = unknown, TError = unknown> = {
16
16
  operationType?: "read" | "write" | "infiniteRead";
17
17
  pluginOptions?: unknown;
18
18
  forceRefetch?: boolean;
19
- hookId?: string;
19
+ instanceId?: string;
20
20
  state?: Partial<OperationState<TData, TError>>;
21
21
  request?: Record<string, unknown>;
22
- /** Custom metadata map for the context */
23
- metadata?: Map<string, unknown>;
22
+ /** Custom temp map for the context */
23
+ temp?: Map<string, unknown>;
24
24
  /** Custom plugins object with get function */
25
25
  plugins?: {
26
26
  get: ReturnType<typeof vi.fn>;
package/dist/index.d.ts CHANGED
@@ -16,11 +16,11 @@ type MockContextOptions<TData = unknown, TError = unknown> = {
16
16
  operationType?: "read" | "write" | "infiniteRead";
17
17
  pluginOptions?: unknown;
18
18
  forceRefetch?: boolean;
19
- hookId?: string;
19
+ instanceId?: string;
20
20
  state?: Partial<OperationState<TData, TError>>;
21
21
  request?: Record<string, unknown>;
22
- /** Custom metadata map for the context */
23
- metadata?: Map<string, unknown>;
22
+ /** Custom temp map for the context */
23
+ temp?: Map<string, unknown>;
24
24
  /** Custom plugins object with get function */
25
25
  plugins?: {
26
26
  get: ReturnType<typeof vi.fn>;
package/dist/index.js CHANGED
@@ -23,9 +23,9 @@ function createMockContext(options = {}) {
23
23
  operationType = "read",
24
24
  pluginOptions,
25
25
  forceRefetch,
26
- hookId,
26
+ instanceId,
27
27
  request = {},
28
- metadata = /* @__PURE__ */ new Map(),
28
+ temp = /* @__PURE__ */ new Map(),
29
29
  plugins = { get: vi.fn() }
30
30
  } = options;
31
31
  return {
@@ -36,13 +36,13 @@ function createMockContext(options = {}) {
36
36
  tags,
37
37
  requestTimestamp: Date.now(),
38
38
  request,
39
- metadata,
39
+ temp,
40
40
  stateManager,
41
41
  eventEmitter,
42
42
  plugins,
43
43
  pluginOptions,
44
44
  forceRefetch,
45
- hookId
45
+ instanceId
46
46
  };
47
47
  }
48
48
  function createMockResponse(overrides = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/test-utils",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Test utilities for Spoosh plugins",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "dist"
43
43
  ],
44
44
  "dependencies": {
45
- "@spoosh/core": "0.11.0"
45
+ "@spoosh/core": "0.12.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "vitest": ">=1.0.0"