import { parseAsset , transformUtxos , transformTokenInfo , transformInputOutput , transformTransaction , transformAccountInfo , } from '../../../src/workers/blockfrost/utils' ; import fixtures from '../fixtures/blockfrost/utils' ; describe ( 'blockfrost/utils' , ( ) => { describe ( 'transformUtxos' , ( ) => { fixtures . transformUtxos . forEach ( f => { it ( f . description , ( ) => { expect ( transformUtxos ( f . utxos ) ) . toEqual ( f . result ) ; } ) ; } ) ; } ) ; describe ( 'parseAsset' , ( ) => { fixtures . parseAsset . forEach ( f => { it ( f . description , ( ) => { expect ( parseAsset ( f . hex ) ) . toEqual ( f . result ) ; } ) ; } ) ; } ) ; describe ( 'transformTokenInfo' , ( ) => { fixtures . transformTokenInfo . forEach ( f => { it ( f . description , ( ) => { expect ( transformTokenInfo ( f . tokens ) ) . toEqual ( f . result ) ; } ) ; } ) ; } ) ; describe ( 'transformInputOutput' , ( ) => { fixtures . transformInputOutput . forEach ( f => { it ( f . description , ( ) => { expect ( transformInputOutput ( f . data , f . asset ) ) . toEqual ( f . result ) ; } ) ; } ) ; } ) ; describe ( 'transformTransaction' , ( ) => { fixtures . transformTransaction . forEach ( f => { it ( f . description , ( ) => { expect ( transformTransaction ( f . descriptor , f . accountAddress , f . data ) ) . toMatchObject ( f . result ) ; } ) ; } ) ; } ) ; describe ( 'transformAccountInfo' , ( ) => { fixtures . transformAccountInfo . forEach ( f => { it ( f . description , ( ) => { expect ( transformAccountInfo ( f . data ) ) . toEqual ( f . result ) ; } ) ; } ) ; } ) ; } ) ;