import util from '../src' ; const types = { time : 'Object' , loader : 'Object' , file : 'Object' , color : 'Object' , uuid : 'Object' , istype : 'Object' , data : 'Object' , is : 'Object' , check : 'Object' , Context : 'Function' , } ; function getType ( data ) { const typeStr = Object . prototype . toString . call ( data ) || '' ; const result = typeStr . replace ( /(\[object|\])/ig , '' ) . trim ( ) ; return result ; } describe ( '@idraw/util' , ( ) => { test ( 'index' , async ( ) => { const keys = Object . keys ( util ) ; keys . forEach ( ( key ) => { const type = getType ( util [ key ] ) ; expect ( type ) . toStrictEqual ( types [ key ] ) ; } ) ; } ) ; } ) ;