Skip to content

Commit 93bcd8a

Browse files
committed
test: add sync generated result for newly added specs
1 parent 4504b59 commit 93bcd8a

File tree

26 files changed

+54908
-21
lines changed

26 files changed

+54908
-21
lines changed

packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const createClient = (config: { baseUrl?: string, auth?: AuthConfig } = {
1212
middleware
1313
}, {
1414
'products': {
15-
'GET': f.builder().def_json().def_searchparams(z.object({ category: z.enum(['electronics', 'clothing', 'books']).optional(), priceRange: z.array(z.number()).optional(), page: z.number().int().min(1).optional(), limit: z.number().int().min(1).max(100).optional(), sort: z.record(z.enum(['asc', 'desc']), z.any()).optional() }).parse).def_response(async ({ json }) => z.array(Model.Product).parse(await json())),
15+
'GET': f.builder().def_json().def_searchparams(z.object({ category: z.enum(['electronics', 'clothing', 'books']).optional(), priceRange: z.array(z.number()).optional(), page: z.number().int().min(1).optional(), limit: z.number().int().min(1).max(100).optional(), sort: z.record(z.string(), z.enum(['asc', 'desc'])).optional() }).parse).def_response(async ({ json }) => z.array(Model.Product).parse(await json())),
1616
'POST': f.builder().def_json().def_body(Model.Product.parse).def_response(async ({ json }) => Model.Product.parse(await json()))
1717
},
1818
'orders': {
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './api'
2-
export * from './models'
1+
export * from './api';
2+
export * from './models';
3+
export * from './auth';

packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const Product = z.object({
1010
export type ProductModel = z.infer<typeof Product>;
1111

1212
export const ElectronicsProduct = Product.and(z.object({
13-
'specs': z.record(z.string(), z.any()).optional()
13+
'specs': z.record(z.string(), z.string()).optional()
1414
}));
1515

1616
export type ElectronicsProductModel = z.infer<typeof ElectronicsProduct>;
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './api'
2-
export * from './models'
1+
export * from './api';
2+
export * from './models';
3+
export * from './auth';

packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/e_commerse_2/models.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,7 @@ export const PaginatedResponse = z.object({
3838

3939
export type PaginatedResponseModel = z.infer<typeof PaginatedResponse>;
4040

41-
export const PaginatedProductResponse = z.object({
42-
'page': z.number().int().optional(),
43-
'pageSize': z.number().int().optional(),
44-
'total': z.number().int().optional(),
45-
'items': z.array(Product).optional()
46-
});
41+
export const PaginatedProductResponse = PaginatedResponse;
4742

4843
export type PaginatedProductResponseModel = z.infer<typeof PaginatedProductResponse>;
4944

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './api'
2-
export * from './models'
1+
export * from './api';
2+
export * from './models';
3+
export * from './auth';
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './api'
2-
export * from './models'
1+
export * from './api';
2+
export * from './models';
3+
export * from './auth';

packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/hell_2/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { z } from 'zod';
22

3-
export const StringDictionary = z.record(z.string(), z.any());
3+
export const StringDictionary = z.record(z.string(), z.string());
44

55
export type StringDictionaryModel = z.infer<typeof StringDictionary>;
66

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './api'
2-
export * from './models'
1+
export * from './api';
2+
export * from './models';
3+
export * from './auth';

packages/create_freestyle_fetch/src/__tests__/__mocks__/.gen/stripe/api.ts

Lines changed: 1947 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)