@@ -13,9 +13,9 @@ describe('generateTableSchema', () => {
13
13
'DEFINE TABLE test TYPE ANY SCHEMAFULL PERMISSIONS NONE' ,
14
14
)
15
15
16
- expect ( inputFields ) . toBe ( 'const testInputSchemaGen = z.object({\n name : z.string()\n})' )
16
+ expect ( inputFields ) . toBe ( 'const testInputSchemaGen = z.object({\nname : z.string(), \n})' )
17
17
18
- expect ( outputFields ) . toBe ( 'const testOutputSchemaGen = z.object({\n name : z.string()\n})' )
18
+ expect ( outputFields ) . toBe ( 'const testOutputSchemaGen = z.object({\nname : z.string(), \n})' )
19
19
} )
20
20
21
21
it ( 'generates a schema for a SCHEMALESS table' , async ( ) => {
@@ -24,9 +24,9 @@ describe('generateTableSchema', () => {
24
24
'DEFINE TABLE test TYPE ANY SCHEMALESS PERMISSIONS NONE' ,
25
25
)
26
26
27
- expect ( inputFields ) . toBe ( 'const testInputSchemaGen = z.object({\n name : z.string()\n}).passthrough()' )
27
+ expect ( inputFields ) . toBe ( 'const testInputSchemaGen = z.object({\nname : z.string(), \n}).passthrough()' )
28
28
29
- expect ( outputFields ) . toBe ( 'const testOutputSchemaGen = z.object({\n name : z.string()\n}).passthrough()' )
29
+ expect ( outputFields ) . toBe ( 'const testOutputSchemaGen = z.object({\nname : z.string(), \n}).passthrough()' )
30
30
} )
31
31
32
32
it ( 'generates a schema for a table without explicit SCHEMAFULL/SCHEMALESS setting' , async ( ) => {
@@ -35,8 +35,8 @@ describe('generateTableSchema', () => {
35
35
'DEFINE TABLE test TYPE ANY PERMISSIONS NONE' ,
36
36
)
37
37
38
- expect ( inputFields ) . toBe ( 'const testInputSchemaGen = z.object({\n name : z.string()\n}).passthrough()' )
38
+ expect ( inputFields ) . toBe ( 'const testInputSchemaGen = z.object({\nname : z.string(), \n}).passthrough()' )
39
39
40
- expect ( outputFields ) . toBe ( 'const testOutputSchemaGen = z.object({\n name : z.string()\n}).passthrough()' )
40
+ expect ( outputFields ) . toBe ( 'const testOutputSchemaGen = z.object({\nname : z.string(), \n}).passthrough()' )
41
41
} )
42
42
} )
0 commit comments