import { clearAllIndexes , config , MeiliSearch } from './meilisearch-test-utils' ; afterAll ( ( ) => { return clearAllIndexes ( config ) ; } ) ; test ( `Client handles host URL with domain and path` , ( ) => { const customHost = `${ config . host }/api/` ; const client = new MeiliSearch ( { host : customHost } ) ; expect ( client . config . host ) . toBe ( customHost ) ; expect ( client . httpRequest . url . href ) . toBe ( customHost ) ; } ) ; test ( `Client handles host URL with domain and path and no trailing slash` , ( ) => { const customHost = `${ config . host }/api` ; const client = new MeiliSearch ( { host : customHost } ) ; expect ( client . config . host ) . toBe ( customHost + '/' ) ; expect ( client . httpRequest . url . href ) . toBe ( customHost + '/' ) ; } ) ;