@uniforge/testing 0.1.0-alpha.2
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/auth/index.d.cts +177 -0
- package/dist/auth/index.d.ts +177 -0
- package/dist/auth/index.js +459 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/index.mjs +418 -0
- package/dist/auth/index.mjs.map +1 -0
- package/dist/billing/index.d.cts +27 -0
- package/dist/billing/index.d.ts +27 -0
- package/dist/billing/index.js +208 -0
- package/dist/billing/index.js.map +1 -0
- package/dist/billing/index.mjs +178 -0
- package/dist/billing/index.mjs.map +1 -0
- package/dist/database/index.d.cts +399 -0
- package/dist/database/index.d.ts +399 -0
- package/dist/database/index.js +19054 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/index.mjs +19046 -0
- package/dist/database/index.mjs.map +1 -0
- package/dist/graphql/index.d.cts +23 -0
- package/dist/graphql/index.d.ts +23 -0
- package/dist/graphql/index.js +18511 -0
- package/dist/graphql/index.js.map +1 -0
- package/dist/graphql/index.mjs +18505 -0
- package/dist/graphql/index.mjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -0
- package/dist/multi-store/index.d.cts +66 -0
- package/dist/multi-store/index.d.ts +66 -0
- package/dist/multi-store/index.js +319 -0
- package/dist/multi-store/index.js.map +1 -0
- package/dist/multi-store/index.mjs +287 -0
- package/dist/multi-store/index.mjs.map +1 -0
- package/dist/multi-tenant/index.d.cts +15 -0
- package/dist/multi-tenant/index.d.ts +15 -0
- package/dist/multi-tenant/index.js +87 -0
- package/dist/multi-tenant/index.js.map +1 -0
- package/dist/multi-tenant/index.mjs +57 -0
- package/dist/multi-tenant/index.mjs.map +1 -0
- package/dist/performance/index.d.cts +60 -0
- package/dist/performance/index.d.ts +60 -0
- package/dist/performance/index.js +280 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/performance/index.mjs +246 -0
- package/dist/performance/index.mjs.map +1 -0
- package/dist/platform/index.d.cts +71 -0
- package/dist/platform/index.d.ts +71 -0
- package/dist/platform/index.js +435 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/index.mjs +396 -0
- package/dist/platform/index.mjs.map +1 -0
- package/dist/rbac/index.d.cts +21 -0
- package/dist/rbac/index.d.ts +21 -0
- package/dist/rbac/index.js +178 -0
- package/dist/rbac/index.js.map +1 -0
- package/dist/rbac/index.mjs +150 -0
- package/dist/rbac/index.mjs.map +1 -0
- package/dist/security/index.d.cts +73 -0
- package/dist/security/index.d.ts +73 -0
- package/dist/security/index.js +246 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/index.mjs +211 -0
- package/dist/security/index.mjs.map +1 -0
- package/dist/shopify-api/index.d.cts +139 -0
- package/dist/shopify-api/index.d.ts +139 -0
- package/dist/shopify-api/index.js +469 -0
- package/dist/shopify-api/index.js.map +1 -0
- package/dist/shopify-api/index.mjs +439 -0
- package/dist/shopify-api/index.mjs.map +1 -0
- package/dist/shopify-compliance/index.d.cts +85 -0
- package/dist/shopify-compliance/index.d.ts +85 -0
- package/dist/shopify-compliance/index.js +287 -0
- package/dist/shopify-compliance/index.js.map +1 -0
- package/dist/shopify-compliance/index.mjs +259 -0
- package/dist/shopify-compliance/index.mjs.map +1 -0
- package/dist/webhooks/index.d.cts +127 -0
- package/dist/webhooks/index.d.ts +127 -0
- package/dist/webhooks/index.js +18934 -0
- package/dist/webhooks/index.js.map +1 -0
- package/dist/webhooks/index.mjs +18916 -0
- package/dist/webhooks/index.mjs.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
import { QueryCost, GraphQLResponse } from '@uniforge/platform-core/graphql';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Mock GraphQL client and response factories for testing.
|
|
6
|
+
*
|
|
7
|
+
* Provides vi.fn()-backed mocks for GraphQLClient and factory
|
|
8
|
+
* functions for creating GraphQLResponse and QueryCost test data.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare function createMockGraphQLClient(): {
|
|
12
|
+
query: ReturnType<typeof vi.fn>;
|
|
13
|
+
mutate: ReturnType<typeof vi.fn>;
|
|
14
|
+
};
|
|
15
|
+
declare function createMockGraphQLResponse<T>(data: T, options?: {
|
|
16
|
+
errors?: Array<{
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
cost?: Partial<QueryCost>;
|
|
20
|
+
}): GraphQLResponse<T>;
|
|
21
|
+
declare function createMockQueryCost(overrides?: Partial<QueryCost>): QueryCost;
|
|
22
|
+
|
|
23
|
+
export { createMockGraphQLClient, createMockGraphQLResponse, createMockQueryCost };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
import { QueryCost, GraphQLResponse } from '@uniforge/platform-core/graphql';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Mock GraphQL client and response factories for testing.
|
|
6
|
+
*
|
|
7
|
+
* Provides vi.fn()-backed mocks for GraphQLClient and factory
|
|
8
|
+
* functions for creating GraphQLResponse and QueryCost test data.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare function createMockGraphQLClient(): {
|
|
12
|
+
query: ReturnType<typeof vi.fn>;
|
|
13
|
+
mutate: ReturnType<typeof vi.fn>;
|
|
14
|
+
};
|
|
15
|
+
declare function createMockGraphQLResponse<T>(data: T, options?: {
|
|
16
|
+
errors?: Array<{
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
cost?: Partial<QueryCost>;
|
|
20
|
+
}): GraphQLResponse<T>;
|
|
21
|
+
declare function createMockQueryCost(overrides?: Partial<QueryCost>): QueryCost;
|
|
22
|
+
|
|
23
|
+
export { createMockGraphQLClient, createMockGraphQLResponse, createMockQueryCost };
|