import * as theo from 'theo' ; import { resolve } from 'path' ; import { dTSTokenFormat } from '../d.ts' ; theo . registerFormat ( 'd.ts' , dTSTokenFormat ) ; describe ( 'dTSFormatter' , ( ) => { it ( 'should return typescript definitions formatted tokens' , ( ) => { return theo . convert ( { transform : { type : 'web' , file : resolve ( __dirname , '../__fixtures__/index.yml' ) , } , format : { type : 'd.ts' , } , } ) . then ( ( dTS ) => { return expect ( dTS ) . toMatchSnapshot ( ) ; } ) . catch ( ( error ) => { console . log ( `Something  went wrong: ${ error }` ) ; throw new Error ( '[dTSFormatter test]: should return typescript definitions formatted tokens threw' ) ; } ) ; } ) ; } ) ;