import { validateStatus } from './http-module.config' ; describe ( 'validateStatus()' , ( ) => { it ( 'should failed to validate status if status is not a number' , ( ) => { const result = validateStatus ( 'hello world' as unknown as number ) ; expect ( result ) . toBe ( false ) ; } ) ; it ( 'should validate status if status is a number greater than 99' , ( ) => { const result = validateStatus ( 100 ) ; expect ( result ) . toBe ( true ) ; } ) ; it ( 'should failed to validate status if status is a number less than 100' , ( ) => { const result = validateStatus ( 99 ) ; expect ( result ) . toBe ( false ) ; } ) ; it ( 'should validate status if status is a number less than 600' , ( ) => { const result = validateStatus ( 599 ) ; expect ( result ) . toBe ( true ) ; } ) ; it ( 'should failed to validate status if status is a number greater than 599' , ( ) => { const result = validateStatus ( 600 ) ; expect ( result ) . toBe ( false ) ; } ) ; } ) ;