import { GlobalSearchFindError } from './errors' ; describe ( 'GlobalSearchFindError' , ( ) => { describe ( '#invalidLicense' , ( ) => { it ( 'create an error with the correct `type`' , ( ) => { const error = GlobalSearchFindError . invalidLicense ( 'foobar' ) ; expect ( error . message ) . toBe ( 'foobar' ) ; expect ( error . type ) . toBe ( 'invalid-license' ) ; } ) ; it ( 'can be identified via instanceof' , ( ) => { const error = GlobalSearchFindError . invalidLicense ( 'foo' ) ; expect ( error instanceof GlobalSearchFindError ) . toBe ( true ) ; } ) ; } ) ; } ) ;