@@ -16,8 +16,8 @@ describe('S', () => {
1616 describe ( 'basic' , ( ) => {
1717 const ajv = new Ajv ( )
1818 const schema = S . object ( )
19- . prop ( 'username' )
20- . prop ( 'password' )
19+ . prop ( 'username' , S . string ( ) )
20+ . prop ( 'password' , S . string ( ) )
2121 . valueOf ( )
2222 const validate = ajv . compile ( schema )
2323
@@ -54,7 +54,7 @@ describe('S', () => {
5454 . ifThen (
5555 S . object ( ) . prop ( 'prop' , S . string ( ) . maxLength ( 5 ) ) ,
5656 S . object ( )
57- . prop ( 'extraProp' )
57+ . prop ( 'extraProp' , S . string ( ) )
5858 . required ( )
5959 )
6060 . valueOf ( )
@@ -94,10 +94,10 @@ describe('S', () => {
9494 . ifThenElse (
9595 S . object ( ) . prop ( 'ifProp' , S . string ( ) . enum ( [ VALUES [ 0 ] ] ) ) ,
9696 S . object ( )
97- . prop ( 'thenProp' )
97+ . prop ( 'thenProp' , S . string ( ) )
9898 . required ( ) ,
9999 S . object ( )
100- . prop ( 'elseProp' )
100+ . prop ( 'elseProp' , S . string ( ) )
101101 . required ( )
102102 )
103103 . valueOf ( )
@@ -136,17 +136,16 @@ describe('S', () => {
136136 'address' ,
137137 S . object ( )
138138 . id ( '#/definitions/address' )
139- . prop ( 'street_address' )
139+ . prop ( 'street_address' , S . string ( ) )
140140 . required ( )
141- . prop ( 'city' )
142- . required ( )
143- . prop ( 'state' )
141+ . prop ( 'city' , S . string ( ) )
144142 . required ( )
143+ . prop ( 'state' , S . string ( ) . required ( ) )
145144 )
146145 . allOf ( [
147146 S . ref ( '#/definitions/address' ) ,
148147 S . object ( )
149- . prop ( 'type' )
148+ . prop ( 'type' , S . string ( ) )
150149 . enum ( [ 'residential' , 'business' ] ) ,
151150 ] )
152151 . valueOf ( )
@@ -235,18 +234,18 @@ describe('S', () => {
235234 . default ( false )
236235 . required ( )
237236 )
238- . prop ( 'thenFooA' )
239- . prop ( 'thenFooB' )
237+ . prop ( 'thenFooA' , S . string ( ) )
238+ . prop ( 'thenFooB' , S . string ( ) )
240239 . allOf ( [
241240 S . ifThen (
242241 S . object ( )
243- . prop ( 'foo' )
242+ . prop ( 'foo' , S . string ( ) )
244243 . enum ( [ 'foo' ] ) ,
245244 S . required ( [ 'thenFooA' , 'thenFooB' ] )
246245 ) ,
247246 S . ifThen (
248247 S . object ( )
249- . prop ( 'bar' )
248+ . prop ( 'bar' , S . string ( ) )
250249 . enum ( [ 'BAR' ] ) ,
251250 S . required ( [ 'thenBarA' , 'thenBarB' ] )
252251 ) ,
@@ -310,11 +309,11 @@ describe('S', () => {
310309 'address' ,
311310 S . object ( )
312311 . id ( '#address' )
313- . prop ( 'country' )
314- . prop ( 'city' )
315- . prop ( 'zipcode' )
312+ . prop ( 'country' , S . string ( ) )
313+ . prop ( 'city' , S . string ( ) )
314+ . prop ( 'zipcode' , S . string ( ) )
316315 )
317- . prop ( 'username' )
316+ . prop ( 'username' , S . string ( ) )
318317 . required ( )
319318 . prop ( 'password' , S . string ( ) . required ( ) )
320319 . prop ( 'address' , S . object ( ) . ref ( '#address' ) )
@@ -325,7 +324,7 @@ describe('S', () => {
325324 S . object ( )
326325 . id ( 'http://foo.com/role' )
327326 . required ( )
328- . prop ( 'name' )
327+ . prop ( 'name' , S . string ( ) )
329328 . prop ( 'permissions' )
330329 )
331330 . prop ( 'age' , S . number ( ) )
@@ -416,7 +415,7 @@ describe('S', () => {
416415 . description ( 'The unique identifier for a product' )
417416 . required ( )
418417 )
419- . prop ( 'name' )
418+ . prop ( 'name' , S . string ( ) )
420419 . required ( )
421420 . prop (
422421 'price' ,
0 commit comments