@jaypie/testkit 1.2.41 → 1.2.42

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,21 +1,39 @@
1
- export declare const getMessages: import("vitest").Mock<(...args: any[]) => any>;
1
+ export declare const getMessages: import("vitest").MockInstance<(...args: any[]) => any> & {
2
+ (...args: any[]): any;
3
+ new (...args: any[]): any;
4
+ } & {};
2
5
  export declare const getS3FileBuffer: (({ bucket, key }: {
3
6
  bucket: string;
4
7
  key: string;
5
8
  }) => Promise<Buffer>) & {
6
9
  mock: any;
7
10
  };
8
- export declare const getSecret: import("vitest").Mock<(...args: any[]) => any>;
9
- export declare const sendMessage: import("vitest").Mock<(...args: any[]) => any>;
11
+ export declare const getSecret: import("vitest").MockInstance<(...args: any[]) => any> & {
12
+ (...args: any[]): any;
13
+ new (...args: any[]): any;
14
+ } & {};
15
+ export declare const sendMessage: import("vitest").MockInstance<(...args: any[]) => any> & {
16
+ (...args: any[]): any;
17
+ new (...args: any[]): any;
18
+ } & {};
10
19
  export declare const getEnvSecret: ((key: string) => Promise<string>) & {
11
20
  mock: any;
12
21
  };
13
- export declare const loadEnvSecrets: import("vitest").Mock<(...args: any[]) => any>;
14
- export declare const getSingletonMessage: import("vitest").Mock<(...args: any[]) => any>;
22
+ export declare const loadEnvSecrets: import("vitest").MockInstance<(...args: any[]) => any> & {
23
+ (...args: any[]): any;
24
+ new (...args: any[]): any;
25
+ } & {};
26
+ export declare const getSingletonMessage: import("vitest").MockInstance<(...args: any[]) => any> & {
27
+ (...args: any[]): any;
28
+ new (...args: any[]): any;
29
+ } & {};
15
30
  export declare const getTextractJob: ((jobId: string) => Promise<any>) & {
16
31
  mock: any;
17
32
  };
18
- export declare const sendBatchMessages: import("vitest").Mock<(...args: any[]) => any>;
33
+ export declare const sendBatchMessages: import("vitest").MockInstance<(...args: any[]) => any> & {
34
+ (...args: any[]): any;
35
+ new (...args: any[]): any;
36
+ } & {};
19
37
  export declare const sendTextractJob: (({ bucket, key, featureTypes, }: {
20
38
  bucket: string;
21
39
  key: string;
@@ -26,26 +26,68 @@ export declare const UnavailableError: typeof errors.UnavailableError;
26
26
  export declare const UnhandledError: typeof errors.UnhandledError;
27
27
  export declare const UnreachableCodeError: typeof errors.UnreachableCodeError;
28
28
  export { log };
29
- export declare const cloneDeep: import("vitest").Mock<(...args: any[]) => any>;
30
- export declare const envBoolean: import("vitest").Mock<(...args: any[]) => any>;
31
- export declare const envsKey: import("vitest").Mock<(...args: any[]) => any>;
29
+ export declare const cloneDeep: import("vitest").MockInstance<(...args: any[]) => any> & {
30
+ (...args: any[]): any;
31
+ new (...args: any[]): any;
32
+ } & {};
33
+ export declare const envBoolean: import("vitest").MockInstance<(...args: any[]) => any> & {
34
+ (...args: any[]): any;
35
+ new (...args: any[]): any;
36
+ } & {};
37
+ export declare const envsKey: import("vitest").MockInstance<(...args: any[]) => any> & {
38
+ (...args: any[]): any;
39
+ new (...args: any[]): any;
40
+ } & {};
32
41
  export declare const errorFromStatusCode: ((statusCode: number, message?: string) => Error) & {
33
42
  mock: any;
34
43
  };
35
- export declare const formatError: import("vitest").Mock<(...args: any[]) => any>;
36
- export declare const generateJaypieKey: import("vitest").Mock<(...args: any[]) => any>;
37
- export declare const hashJaypieKey: import("vitest").Mock<(...args: any[]) => any>;
38
- export declare const jaypieApiKeyId: import("vitest").Mock<(...args: any[]) => any>;
44
+ export declare const formatError: import("vitest").MockInstance<(...args: any[]) => any> & {
45
+ (...args: any[]): any;
46
+ new (...args: any[]): any;
47
+ } & {};
48
+ export declare const generateJaypieKey: import("vitest").MockInstance<(...args: any[]) => any> & {
49
+ (...args: any[]): any;
50
+ new (...args: any[]): any;
51
+ } & {};
52
+ export declare const hashJaypieKey: import("vitest").MockInstance<(...args: any[]) => any> & {
53
+ (...args: any[]): any;
54
+ new (...args: any[]): any;
55
+ } & {};
56
+ export declare const jaypieApiKeyId: import("vitest").MockInstance<(...args: any[]) => any> & {
57
+ (...args: any[]): any;
58
+ new (...args: any[]): any;
59
+ } & {};
39
60
  export declare const jaypieErrorFromStatus: ((statusCode: number, message?: string) => Error) & {
40
61
  mock: any;
41
62
  };
42
- export declare const getHeaderFrom: import("vitest").Mock<(...args: any[]) => any>;
43
- export declare const getObjectKeyCaseInsensitive: import("vitest").Mock<(...args: any[]) => any>;
44
- export declare const isClass: import("vitest").Mock<(...args: any[]) => any>;
45
- export declare const isJaypieError: import("vitest").Mock<(...args: any[]) => any>;
46
- export declare const resolveValue: import("vitest").Mock<(...args: any[]) => any>;
47
- export declare const safeParseFloat: import("vitest").Mock<(...args: any[]) => any>;
48
- export declare const placeholders: import("vitest").Mock<(...args: any[]) => any>;
63
+ export declare const getHeaderFrom: import("vitest").MockInstance<(...args: any[]) => any> & {
64
+ (...args: any[]): any;
65
+ new (...args: any[]): any;
66
+ } & {};
67
+ export declare const getObjectKeyCaseInsensitive: import("vitest").MockInstance<(...args: any[]) => any> & {
68
+ (...args: any[]): any;
69
+ new (...args: any[]): any;
70
+ } & {};
71
+ export declare const isClass: import("vitest").MockInstance<(...args: any[]) => any> & {
72
+ (...args: any[]): any;
73
+ new (...args: any[]): any;
74
+ } & {};
75
+ export declare const isJaypieError: import("vitest").MockInstance<(...args: any[]) => any> & {
76
+ (...args: any[]): any;
77
+ new (...args: any[]): any;
78
+ } & {};
79
+ export declare const resolveValue: import("vitest").MockInstance<(...args: any[]) => any> & {
80
+ (...args: any[]): any;
81
+ new (...args: any[]): any;
82
+ } & {};
83
+ export declare const safeParseFloat: import("vitest").MockInstance<(...args: any[]) => any> & {
84
+ (...args: any[]): any;
85
+ new (...args: any[]): any;
86
+ } & {};
87
+ export declare const placeholders: import("vitest").MockInstance<(...args: any[]) => any> & {
88
+ (...args: any[]): any;
89
+ new (...args: any[]): any;
90
+ } & {};
49
91
  export declare const force: kit.ForceFunction;
50
92
  export declare const jaypieHandler: ((handler: Function, options?: {
51
93
  setup?: Function | Function[];
@@ -55,9 +97,18 @@ export declare const jaypieHandler: ((handler: Function, options?: {
55
97
  }) => Function) & {
56
98
  mock: any;
57
99
  };
58
- export declare const sleep: import("vitest").Mock<(...args: any[]) => any>;
59
- export declare const uuid: import("vitest").Mock<(...args: any[]) => any>;
60
- export declare const validateJaypieKey: import("vitest").Mock<(...args: any[]) => any>;
100
+ export declare const sleep: import("vitest").MockInstance<(...args: any[]) => any> & {
101
+ (...args: any[]): any;
102
+ new (...args: any[]): any;
103
+ } & {};
104
+ export declare const uuid: import("vitest").MockInstance<(...args: any[]) => any> & {
105
+ (...args: any[]): any;
106
+ new (...args: any[]): any;
107
+ } & {};
108
+ export declare const validateJaypieKey: import("vitest").MockInstance<(...args: any[]) => any> & {
109
+ (...args: any[]): any;
110
+ new (...args: any[]): any;
111
+ } & {};
61
112
  export declare const HTTP: {
62
113
  readonly ALLOW: {
63
114
  readonly ANY: "*";
@@ -16,7 +16,19 @@ export declare const DATADOG: {
16
16
  };
17
17
  SITE: string;
18
18
  };
19
- export declare const hasDatadogEnv: import("vitest").Mock<(...args: any[]) => any>;
20
- export declare const submitDistribution: import("vitest").Mock<(...args: any[]) => any>;
21
- export declare const submitMetric: import("vitest").Mock<(...args: any[]) => any>;
22
- export declare const submitMetricSet: import("vitest").Mock<(...args: any[]) => any>;
19
+ export declare const hasDatadogEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
20
+ (...args: any[]): any;
21
+ new (...args: any[]): any;
22
+ } & {};
23
+ export declare const submitDistribution: import("vitest").MockInstance<(...args: any[]) => any> & {
24
+ (...args: any[]): any;
25
+ new (...args: any[]): any;
26
+ } & {};
27
+ export declare const submitMetric: import("vitest").MockInstance<(...args: any[]) => any> & {
28
+ (...args: any[]): any;
29
+ new (...args: any[]): any;
30
+ } & {};
31
+ export declare const submitMetricSet: import("vitest").MockInstance<(...args: any[]) => any> & {
32
+ (...args: any[]): any;
33
+ new (...args: any[]): any;
34
+ } & {};
@@ -1,7 +1,16 @@
1
1
  import * as original from "@jaypie/express";
2
- export declare const createLambdaHandler: import("vitest").Mock<(...args: any[]) => any>;
3
- export declare const createLambdaStreamHandler: import("vitest").Mock<(...args: any[]) => any>;
4
- export declare const getCurrentInvoke: import("vitest").Mock<(...args: any[]) => any>;
2
+ export declare const createLambdaHandler: import("vitest").MockInstance<(...args: any[]) => any> & {
3
+ (...args: any[]): any;
4
+ new (...args: any[]): any;
5
+ } & {};
6
+ export declare const createLambdaStreamHandler: import("vitest").MockInstance<(...args: any[]) => any> & {
7
+ (...args: any[]): any;
8
+ new (...args: any[]): any;
9
+ } & {};
10
+ export declare const getCurrentInvoke: import("vitest").MockInstance<(...args: any[]) => any> & {
11
+ (...args: any[]): any;
12
+ new (...args: any[]): any;
13
+ } & {};
5
14
  export declare const LambdaRequest: typeof original.LambdaRequest;
6
15
  export declare const LambdaResponseBuffered: typeof original.LambdaResponseBuffered;
7
16
  export declare const LambdaResponseStreaming: typeof original.LambdaResponseStreaming;
@@ -12,18 +21,54 @@ export declare const EXPRESS: {
12
21
  readonly ROOT: RegExp;
13
22
  };
14
23
  };
15
- export declare const badRequestRoute: import("vitest").Mock<(...args: any[]) => any>;
16
- export declare const echoRoute: import("vitest").Mock<(...args: any[]) => any>;
17
- export declare const forbiddenRoute: import("vitest").Mock<(...args: any[]) => any>;
18
- export declare const goneRoute: import("vitest").Mock<(...args: any[]) => any>;
19
- export declare const methodNotAllowedRoute: import("vitest").Mock<(...args: any[]) => any>;
20
- export declare const noContentRoute: import("vitest").Mock<(...args: any[]) => any>;
21
- export declare const notFoundRoute: import("vitest").Mock<(...args: any[]) => any>;
22
- export declare const notImplementedRoute: import("vitest").Mock<(...args: any[]) => any>;
23
- export declare const expressHttpCodeHandler: import("vitest").Mock<(...args: any[]) => any>;
24
- export declare const cors: import("vitest").Mock<(...args: any[]) => any>;
25
- export declare const fabricApiResponse: import("vitest").Mock<(...args: any[]) => any>;
26
- export declare const getCurrentInvokeUuid: import("vitest").Mock<(...args: any[]) => any>;
24
+ export declare const badRequestRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
25
+ (...args: any[]): any;
26
+ new (...args: any[]): any;
27
+ } & {};
28
+ export declare const echoRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
29
+ (...args: any[]): any;
30
+ new (...args: any[]): any;
31
+ } & {};
32
+ export declare const forbiddenRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
33
+ (...args: any[]): any;
34
+ new (...args: any[]): any;
35
+ } & {};
36
+ export declare const goneRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
37
+ (...args: any[]): any;
38
+ new (...args: any[]): any;
39
+ } & {};
40
+ export declare const methodNotAllowedRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
41
+ (...args: any[]): any;
42
+ new (...args: any[]): any;
43
+ } & {};
44
+ export declare const noContentRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
45
+ (...args: any[]): any;
46
+ new (...args: any[]): any;
47
+ } & {};
48
+ export declare const notFoundRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
49
+ (...args: any[]): any;
50
+ new (...args: any[]): any;
51
+ } & {};
52
+ export declare const notImplementedRoute: import("vitest").MockInstance<(...args: any[]) => any> & {
53
+ (...args: any[]): any;
54
+ new (...args: any[]): any;
55
+ } & {};
56
+ export declare const expressHttpCodeHandler: import("vitest").MockInstance<(...args: any[]) => any> & {
57
+ (...args: any[]): any;
58
+ new (...args: any[]): any;
59
+ } & {};
60
+ export declare const cors: import("vitest").MockInstance<(...args: any[]) => any> & {
61
+ (...args: any[]): any;
62
+ new (...args: any[]): any;
63
+ } & {};
64
+ export declare const fabricApiResponse: import("vitest").MockInstance<(...args: any[]) => any> & {
65
+ (...args: any[]): any;
66
+ new (...args: any[]): any;
67
+ } & {};
68
+ export declare const getCurrentInvokeUuid: import("vitest").MockInstance<(...args: any[]) => any> & {
69
+ (...args: any[]): any;
70
+ new (...args: any[]): any;
71
+ } & {};
27
72
  export interface ExpressHandlerFunction {
28
73
  (req: any, res: any, ...extra: any[]): Promise<any> | any;
29
74
  }
@@ -1,3 +1,12 @@
1
- export declare const isLocalEnv: import("vitest").Mock<(...args: any[]) => any>;
2
- export declare const isNodeTestEnv: import("vitest").Mock<(...args: any[]) => any>;
3
- export declare const isProductionEnv: import("vitest").Mock<(...args: any[]) => any>;
1
+ export declare const isLocalEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
2
+ (...args: any[]): any;
3
+ new (...args: any[]): any;
4
+ } & {};
5
+ export declare const isNodeTestEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
6
+ (...args: any[]): any;
7
+ new (...args: any[]): any;
8
+ } & {};
9
+ export declare const isProductionEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
10
+ (...args: any[]): any;
11
+ new (...args: any[]): any;
12
+ } & {};
@@ -1,8 +1,17 @@
1
1
  import * as original from "@jaypie/llm";
2
2
  export declare const LLM: typeof original.LLM;
3
- export declare const Llm: import("vitest").Mock<(...args: any[]) => any> & {
4
- operate: import("vitest").Mock<(...args: any[]) => any>;
5
- send: import("vitest").Mock<(...args: any[]) => any>;
3
+ export declare const Llm: import("vitest").MockInstance<import("@vitest/spy").Procedure> & {
4
+ (...args: any[]): any;
5
+ new (...args: any[]): any;
6
+ } & {} & {
7
+ operate: import("vitest").MockInstance<(...args: any[]) => any> & {
8
+ (...args: any[]): any;
9
+ new (...args: any[]): any;
10
+ } & {};
11
+ send: import("vitest").MockInstance<(...args: any[]) => any> & {
12
+ (...args: any[]): any;
13
+ new (...args: any[]): any;
14
+ } & {};
6
15
  };
7
16
  export declare const Toolkit: typeof original.Toolkit;
8
17
  export declare const JaypieToolkit: typeof original.JaypieToolkit;
@@ -1,8 +1,11 @@
1
1
  import { FORMAT, LEVEL, Logger, redactAuth, sanitizeAuth } from "@jaypie/logger";
2
2
  declare const mockLog: import("../types").LogMock;
3
- export declare const createLogger: import("vitest").Mock<(...args: any[]) => any>;
4
- export declare const _resetDatadogTransport: import("vitest").Mock<(...args: any[]) => any>;
5
- export declare const getDatadogTransport: import("vitest").Mock<(...args: any[]) => any>;
6
- export declare const isDatadogForwardingEnabled: import("vitest").Mock<(...args: any[]) => any>;
3
+ export declare const createLogger: import("vitest").MockInstance<(...args: any[]) => any> & {
4
+ (...args: any[]): any;
5
+ new (...args: any[]): any;
6
+ } & {};
7
+ export declare const _resetDatadogTransport: import("vitest").Mock<import("@vitest/spy").Procedure>;
8
+ export declare const getDatadogTransport: import("vitest").Mock<import("@vitest/spy").Procedure>;
9
+ export declare const isDatadogForwardingEnabled: import("vitest").Mock<import("@vitest/spy").Procedure>;
7
10
  export { FORMAT, LEVEL, Logger, redactAuth, sanitizeAuth };
8
11
  export default mockLog;
@@ -1,4 +1,13 @@
1
- export declare const connect: import("vitest").Mock<(...args: any[]) => any>;
2
- export declare const connectFromSecretEnv: import("vitest").Mock<(...args: any[]) => any>;
3
- export declare const disconnect: import("vitest").Mock<(...args: any[]) => any>;
1
+ export declare const connect: import("vitest").MockInstance<(...args: any[]) => any> & {
2
+ (...args: any[]): any;
3
+ new (...args: any[]): any;
4
+ } & {};
5
+ export declare const connectFromSecretEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
6
+ (...args: any[]): any;
7
+ new (...args: any[]): any;
8
+ } & {};
9
+ export declare const disconnect: import("vitest").MockInstance<(...args: any[]) => any> & {
10
+ (...args: any[]): any;
11
+ new (...args: any[]): any;
12
+ } & {};
4
13
  export { mongoose } from "@jaypie/mongoose";
@@ -5,9 +5,15 @@ export declare const MarkdownPage: any;
5
5
  /**
6
6
  * Mock for textractJsonToMarkdown function from @jaypie/textract
7
7
  */
8
- export declare const textractJsonToMarkdown: import("vitest").Mock<(...args: any[]) => any>;
8
+ export declare const textractJsonToMarkdown: import("vitest").MockInstance<(...args: any[]) => any> & {
9
+ (...args: any[]): any;
10
+ new (...args: any[]): any;
11
+ } & {};
9
12
  declare const _default: {
10
13
  MarkdownPage: any;
11
- textractJsonToMarkdown: import("vitest").Mock<(...args: any[]) => any>;
14
+ textractJsonToMarkdown: import("vitest").MockInstance<(...args: any[]) => any> & {
15
+ (...args: any[]): any;
16
+ new (...args: any[]): any;
17
+ } & {};
12
18
  };
13
19
  export default _default;
@@ -1,7 +1,10 @@
1
1
  export declare const expandIncludes: ((...args: any[]) => any) & {
2
2
  mock: any;
3
3
  };
4
- export declare const isValidAlias: import("vitest").Mock<(...args: any[]) => any>;
4
+ export declare const isValidAlias: import("vitest").MockInstance<(...args: any[]) => any> & {
5
+ (...args: any[]): any;
6
+ new (...args: any[]): any;
7
+ } & {};
5
8
  export declare const getAlternativeSpellings: ((...args: any[]) => any) & {
6
9
  mock: any;
7
10
  };
@@ -1,5 +1,6 @@
1
- import { vi } from "vitest";
2
1
  import { LlmTool } from "@jaypie/llm";
2
+ import { type Mock } from "vitest";
3
+ type MockFn = Mock<(...args: any[]) => any>;
3
4
  /**
4
5
  * Creates function mocks with proper typing
5
6
  * Internal utility to create properly typed mocks
@@ -11,12 +12,12 @@ declare function createMockFunction<T extends (...args: any[]) => any>(implement
11
12
  * Creates a mock function that resolves to a value when awaited
12
13
  * Internal utility to create async mock functions
13
14
  */
14
- declare function createMockResolvedFunction<T>(value: T): ReturnType<typeof vi.fn>;
15
+ declare function createMockResolvedFunction<T>(value: T): MockFn;
15
16
  /**
16
17
  * Creates a mock function that returns a value
17
18
  * Internal utility to create mock functions that return a value
18
19
  */
19
- declare function createMockReturnedFunction<T>(value: T): ReturnType<typeof vi.fn>;
20
+ declare function createMockReturnedFunction<T>(value: T): MockFn;
20
21
  /**
21
22
  * Creates a mock function that wraps another function
22
23
  * Internal utility to create mock functions that wrap another function
@@ -25,7 +26,7 @@ declare function createMockWrappedFunction<T = any>(fn: (...args: unknown[]) =>
25
26
  fallback?: any;
26
27
  throws?: boolean;
27
28
  class?: boolean;
28
- }): ReturnType<typeof vi.fn>;
29
+ }): MockFn;
29
30
  declare function createMockWrappedObject<T extends Record<string, any>>(object: T, fallbackOrOptions?: any | {
30
31
  fallback?: any;
31
32
  throws?: boolean;
@@ -1,4 +1,13 @@
1
- export declare const connect: import("vitest").Mock<(...args: any[]) => any>;
2
- export declare const connectFromSecretEnv: import("vitest").Mock<(...args: any[]) => any>;
3
- export declare const disconnect: import("vitest").Mock<(...args: any[]) => any>;
1
+ export declare const connect: import("vitest").MockInstance<(...args: any[]) => any> & {
2
+ (...args: any[]): any;
3
+ new (...args: any[]): any;
4
+ } & {};
5
+ export declare const connectFromSecretEnv: import("vitest").MockInstance<(...args: any[]) => any> & {
6
+ (...args: any[]): any;
7
+ new (...args: any[]): any;
8
+ } & {};
9
+ export declare const disconnect: import("vitest").MockInstance<(...args: any[]) => any> & {
10
+ (...args: any[]): any;
11
+ new (...args: any[]): any;
12
+ } & {};
4
13
  export { mongoose } from "@jaypie/mongoose";
@@ -5,9 +5,15 @@ export declare const MarkdownPage: any;
5
5
  /**
6
6
  * Mock for textractJsonToMarkdown function from @jaypie/textract
7
7
  */
8
- export declare const textractJsonToMarkdown: import("vitest").Mock<(...args: any[]) => any>;
8
+ export declare const textractJsonToMarkdown: import("vitest").MockInstance<(...args: any[]) => any> & {
9
+ (...args: any[]): any;
10
+ new (...args: any[]): any;
11
+ } & {};
9
12
  declare const _default: {
10
13
  MarkdownPage: any;
11
- textractJsonToMarkdown: import("vitest").Mock<(...args: any[]) => any>;
14
+ textractJsonToMarkdown: import("vitest").MockInstance<(...args: any[]) => any> & {
15
+ (...args: any[]): any;
16
+ new (...args: any[]): any;
17
+ } & {};
12
18
  };
13
19
  export default _default;
@@ -1,7 +1,10 @@
1
1
  export declare const expandIncludes: ((...args: any[]) => any) & {
2
2
  mock: any;
3
3
  };
4
- export declare const isValidAlias: import("vitest").Mock<(...args: any[]) => any>;
4
+ export declare const isValidAlias: import("vitest").MockInstance<(...args: any[]) => any> & {
5
+ (...args: any[]): any;
6
+ new (...args: any[]): any;
7
+ } & {};
5
8
  export declare const getAlternativeSpellings: ((...args: any[]) => any) & {
6
9
  mock: any;
7
10
  };
@@ -1,5 +1,6 @@
1
- import { vi } from "vitest";
2
1
  import { LlmTool } from "@jaypie/llm";
2
+ import { type Mock } from "vitest";
3
+ type MockFn = Mock<(...args: any[]) => any>;
3
4
  /**
4
5
  * Creates function mocks with proper typing
5
6
  * Internal utility to create properly typed mocks
@@ -11,12 +12,12 @@ declare function createMockFunction<T extends (...args: any[]) => any>(implement
11
12
  * Creates a mock function that resolves to a value when awaited
12
13
  * Internal utility to create async mock functions
13
14
  */
14
- declare function createMockResolvedFunction<T>(value: T): ReturnType<typeof vi.fn>;
15
+ declare function createMockResolvedFunction<T>(value: T): MockFn;
15
16
  /**
16
17
  * Creates a mock function that returns a value
17
18
  * Internal utility to create mock functions that return a value
18
19
  */
19
- declare function createMockReturnedFunction<T>(value: T): ReturnType<typeof vi.fn>;
20
+ declare function createMockReturnedFunction<T>(value: T): MockFn;
20
21
  /**
21
22
  * Creates a mock function that wraps another function
22
23
  * Internal utility to create mock functions that wrap another function
@@ -25,7 +26,7 @@ declare function createMockWrappedFunction<T = any>(fn: (...args: unknown[]) =>
25
26
  fallback?: any;
26
27
  throws?: boolean;
27
28
  class?: boolean;
28
- }): ReturnType<typeof vi.fn>;
29
+ }): MockFn;
29
30
  declare function createMockWrappedObject<T extends Record<string, any>>(object: T, fallbackOrOptions?: any | {
30
31
  fallback?: any;
31
32
  throws?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/testkit",
3
- "version": "1.2.41",
3
+ "version": "1.2.42",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/finlaysonstudio/jaypie.git"
@@ -55,7 +55,7 @@
55
55
  "rollup-plugin-copy": "^3.5.0",
56
56
  "rollup-plugin-dts": "^6.1.1",
57
57
  "typescript": "^5.0.0",
58
- "vitest": "^3.0.5"
58
+ "vitest": "^4.1.8"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@jaypie/dynamodb": "*",