import { createPackageSource } from '../package-source' ; test ( 'package source' , async ( ) => { const source = createPackageSource ( ) ; const result = await source . fetch ( 'awilix' ) ; expect ( result . name ) . toBe ( 'awilix' ) ; expect ( result . latestVersion ) . toBeDefined ( ) ; const v2 = result . versions . find ( ( x ) => x . version === '2.0.0' ) ! ; expect ( v2 ) . toEqual ( { version : '2.0.0' , containsInternalTypings : false , } ) ; const v3 = result . versions . find ( ( x ) => x . version === '3.0.0' ) ! ; expect ( v3 ) . toEqual ( { version : '3.0.0' , containsInternalTypings : true , } ) ; } ) ;