@@ -281,10 +281,10 @@ func TestFaker_Schema(t *testing.T) {
281281		},
282282		{
283283			name :   "minItems" ,
284- 			schema : "{ minItems: 3, }" ,
284+ 			schema : "{ minItems: 3, items: { type: 'string' }  }" ,
285285			test : func (t  * testing.T , v  goja.Value , err  error ) {
286286				r .NoError (t , err )
287- 				r .Equal (t , []any { true ,  int64 ( - 354976 ),  "ZuoWq vY5elXhlD" , [] interface {}{- 743110.6375100765 , "lYehCIA " , map [ string ] interface {}{ "caravan" :  true , "hail"  :  - 717855.7306413883 , "mob"  :  int64 ( - 679449 ) , "scale"  :  true },  false },  false , [] interface {}{ true ,  int64 ( 859972 ),  - 161661.97092417115 },  false ,  "LWxKt "v .Export ())
287+ 				r .Equal (t , []interface {}{"" , "idZ " , "wYx?vY5elXhlD" , "VhgPevuwyrNrL"  , "lVeCZKW1JKqG"  , "sffl"  ,  "tR" ,  "h "v .Export ())
288288			},
289289		},
290290		{
@@ -326,10 +326,10 @@ func TestFaker_Schema(t *testing.T) {
326326		},
327327		{
328328			name :   "contains" ,
329- 			schema : "{ contains: { type: 'string' } }" ,
329+ 			schema : "{ contains: { const: 'foo' }, items: {  type: 'string' } }" ,
330330			test : func (t  * testing.T , v  goja.Value , err  error ) {
331331				r .NoError (t , err )
332- 				r .Equal (t , []any {[] any { true ,  int64 ( 859972 ),  - 161661.97092417115 },  "wYx?vY5elXhlD "[] any { - 743110.6375100765 ,  "lYehCIA "map [ string ] any { "caravan" :  true , "hail"  :  - 717855.7306413883 , "mob"  :  int64 ( - 679449 ),  "scale" :  true },  false },  false ,  "idZ "v .Export ())
332+ 				r .Equal (t , []any {"VhgPevuwyrNrL ""foo ""idZ" , "wYx?vY5elXhlD"  , "foo " }, v .Export ())
333333			},
334334		},
335335		{
@@ -356,10 +356,10 @@ func TestFaker_Schema(t *testing.T) {
356356		},
357357		{
358358			name :   "maxContains" ,
359- 			schema : "{ contains: { type: 'string' }, maxContains: 2 }" ,
359+ 			schema : "{ contains: { type: 'string' }, maxContains: 2, items: { type: 'string' }  }" ,
360360			test : func (t  * testing.T , v  goja.Value , err  error ) {
361361				r .NoError (t , err )
362- 				r .Equal (t , []any {" vY5elXhlD4ezl"  ,  - 859791.1845789105 ,  326768.021588166 ,  int64 ( 628235 ) , "idZ" }, v .Export ())
362+ 				r .Equal (t , []any {"wYx?vY5elXhlD"  , "idZ" }, v .Export ())
363363			},
364364		},
365365		{
@@ -401,10 +401,10 @@ func TestFaker_Schema(t *testing.T) {
401401		},
402402		{
403403			name :   "minProperties" ,
404- 			schema : "{ minProperties: 3 }" ,
404+ 			schema : "{ minProperties: 3, additionalProperties: { type: 'string' }  }" ,
405405			test : func (t  * testing.T , v  goja.Value , err  error ) {
406406				r .NoError (t , err )
407- 				r .Equal (t , map [string ]any {"bunch" : 326768.021588166 , "gang" : int64 ( 628235 ) , "growth" : " vY5elXhlD4ezl " , "woman" : - 859791.1845789105 }, v .Export ())
407+ 				r .Equal (t , map [string ]any {"bunch" : "VhgPevuwyrNrL" , "gang" : "lVeCZKW1JKqG" , "growth" : "sffl " , "woman" : "wYx?vY5elXhlD" }, v .Export ())
408408			},
409409		},
410410		{
@@ -454,13 +454,13 @@ func TestFaker_Schema(t *testing.T) {
454454		},
455455		{
456456			name :   "properties, patternProperties and additionalProperties" ,
457- 			schema : "{ properties: { builtin: { type: 'number ' } }, patternProperties: { '^S_': { type: 'string' }, '^I_': { type: 'integer' } }, additionalProperties: { type: 'string' } }" ,
457+ 			schema : "{ properties: { builtin: { type: 'integer ' } }, patternProperties: { '^S_': { type: 'string' }, '^I_': { type: 'integer' } }, additionalProperties: { type: 'string' } }" ,
458458			test : func (t  * testing.T , v  goja.Value , err  error ) {
459459				r .NoError (t , err )
460460				r .Equal (t , map [string ]any {
461461					"I_4VX" :    int64 (- 908662 ),
462462					"S_kY9X3W" : "m" ,
463- 					"builtin" :  - 383134.1033810867 ,
463+ 					"builtin" :  int64 ( - 86829 ) ,
464464					"group" :    "CKu" ,
465465					"ocean" :    "LJgmr9arWgSfi" ,
466466					"party" :    "m" ,
@@ -584,12 +584,12 @@ func TestFaker_Schema(t *testing.T) {
584584		},
585585		{
586586			name :   "required but not defined in properties" ,
587- 			schema : "{ properties: { foo: { type: 'string' } }, required: ['bar'] }" ,
587+ 			schema : "{ properties: { foo: { type: 'string' }}, additionalProperties: { type: 'string'  }, required: ['bar'] }" ,
588588			test : func (t  * testing.T , v  goja.Value , err  error ) {
589589				r .NoError (t , err )
590590				m  :=  v .Export ()
591591				r .Contains (t , m , "bar" )
592- 				r .Equal (t , map [string ]any {"bar" : 256208.42538087885 , "foo " : "XidZuoWq  " }, m )
592+ 				r .Equal (t , map [string ]any {"bar" : "Pevuwy" , "woman " : "q vY5elXhlD4ez " }, m )
593593			},
594594		},
595595		{
0 commit comments