@jaypie/testkit 1.2.40 → 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.
- package/dist/mock/aws.d.ts +24 -6
- package/dist/mock/core.d.ts +68 -17
- package/dist/mock/datadog.d.ts +16 -4
- package/dist/mock/express.d.ts +60 -15
- package/dist/mock/index.d.ts +223 -58
- package/dist/mock/index.js +33 -13
- package/dist/mock/index.js.map +1 -1
- package/dist/mock/kit.d.ts +12 -3
- package/dist/mock/llm.d.ts +14 -3
- package/dist/mock/logger.d.ts +7 -4
- package/dist/mock/mock/aws.d.ts +24 -6
- package/dist/mock/mock/core.d.ts +68 -17
- package/dist/mock/mock/datadog.d.ts +16 -4
- package/dist/mock/mock/express.d.ts +60 -15
- package/dist/mock/mock/kit.d.ts +12 -3
- package/dist/mock/mock/llm.d.ts +14 -3
- package/dist/mock/mock/logger.d.ts +7 -4
- package/dist/mock/mock/mongoose.d.ts +12 -3
- package/dist/mock/mock/textract.d.ts +8 -2
- package/dist/mock/mock/tildeskill.d.ts +4 -1
- package/dist/mock/mock/utils.d.ts +5 -4
- package/dist/mock/mongoose.d.ts +12 -3
- package/dist/mock/textract.d.ts +8 -2
- package/dist/mock/tildeskill.d.ts +4 -1
- package/dist/mock/utils.d.ts +5 -4
- package/package.json +2 -2
package/dist/mock/mock/core.d.ts
CHANGED
|
@@ -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").
|
|
30
|
-
|
|
31
|
-
|
|
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").
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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").
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export declare const
|
|
47
|
-
|
|
48
|
-
|
|
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").
|
|
59
|
-
|
|
60
|
-
|
|
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").
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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").
|
|
3
|
-
|
|
4
|
-
|
|
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").
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
}
|
package/dist/mock/mock/kit.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
export declare const isLocalEnv: import("vitest").
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
} & {};
|
package/dist/mock/mock/llm.d.ts
CHANGED
|
@@ -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").
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
@@ -10,6 +19,8 @@ export declare const LlmMessageRole: typeof original.LlmMessageRole;
|
|
|
10
19
|
export declare const LlmMessageType: typeof original.LlmMessageType;
|
|
11
20
|
export declare const LlmStreamChunkType: typeof original.LlmStreamChunkType;
|
|
12
21
|
export declare const BedrockProvider: typeof original.BedrockProvider;
|
|
22
|
+
export declare const GoogleProvider: typeof original.GeminiProvider;
|
|
23
|
+
/** @deprecated Use GoogleProvider — "Google" is the provider; Gemini is the model family */
|
|
13
24
|
export declare const GeminiProvider: typeof original.GeminiProvider;
|
|
14
25
|
export declare const OpenRouterProvider: typeof original.OpenRouterProvider;
|
|
15
26
|
export declare const XaiProvider: typeof original.XaiProvider;
|
|
@@ -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").
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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").
|
|
2
|
-
|
|
3
|
-
|
|
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").
|
|
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").
|
|
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").
|
|
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):
|
|
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):
|
|
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
|
-
}):
|
|
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/dist/mock/mongoose.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
export declare const connect: import("vitest").
|
|
2
|
-
|
|
3
|
-
|
|
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";
|
package/dist/mock/textract.d.ts
CHANGED
|
@@ -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").
|
|
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").
|
|
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").
|
|
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
|
};
|
package/dist/mock/utils.d.ts
CHANGED
|
@@ -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):
|
|
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):
|
|
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
|
-
}):
|
|
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.
|
|
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": "^
|
|
58
|
+
"vitest": "^4.1.8"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@jaypie/dynamodb": "*",
|