@@ -267,14 +267,19 @@ describe('SchemaField', () => {
267267 } )
268268
269269 describe ( 'getType()' , ( ) => {
270- describe ( 'with type: String' , ( ) => {
271- it ( 'should return a string' , ( ) => {
272- const field = new SchemaField ( 'field' , { type : 'string' } )
273- expect ( field . getType ( ) ) . toBe ( 'string' )
270+ describe ( 'with type defined' , ( ) => {
271+ it ( 'should return the type' , ( ) => {
272+ expect ( new SchemaField ( 'field' , { type : 'array' } ) . getType ( ) ) . toBe ( 'array' )
273+ expect ( new SchemaField ( 'field' , { type : 'boolean' } ) . getType ( ) ) . toBe ( 'boolean' )
274+ expect ( new SchemaField ( 'field' , { type : 'integer' } ) . getType ( ) ) . toBe ( 'integer' )
275+ expect ( new SchemaField ( 'field' , { type : 'null' } ) . getType ( ) ) . toBe ( 'null' )
276+ expect ( new SchemaField ( 'field' , { type : 'number' } ) . getType ( ) ) . toBe ( 'number' )
277+ expect ( new SchemaField ( 'field' , { type : 'object' } ) . getType ( ) ) . toBe ( 'object' )
278+ expect ( new SchemaField ( 'field' , { type : 'string' } ) . getType ( ) ) . toBe ( 'string' )
274279 } )
275280 } )
276281
277- describe ( 'with type: undefined' , ( ) => {
282+ describe ( 'with type undefined' , ( ) => {
278283 it ( 'should return undefined' , ( ) => {
279284 const field = new SchemaField ( 'field' , { } )
280285 expect ( field . getType ( ) ) . toBeUndefined ( )
0 commit comments