File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ describe('convertV3ToV2', () => {
397397 assert . strictEqual ( result [ 1 ] . exchangeRate , '51000' )
398398 } )
399399
400- it ( 'should not match when request has no date but response has date' , ( ) => {
400+ it ( 'should throw error when request has no date' , ( ) => {
401401 const v2Requests = [
402402 { currency_pair : 'BTC_iso:USD' } // No date specified
403403 ]
@@ -413,12 +413,10 @@ describe('convertV3ToV2', () => {
413413 fiat : [ ]
414414 }
415415
416- const result = convertV3ToV2 ( v2Requests , v3Response , currencyCodeMap )
417-
418- assert . strictEqual ( result . length , 1 )
419- // Should not match since request has no date but response has a date
420- assert . isNull ( result [ 0 ] . exchangeRate )
421- assert . match ( result [ 0 ] . error ?? '' , / N o r a t e f o u n d / )
416+ // Should throw error since all V2 requests must have dates
417+ assert . throws ( ( ) => {
418+ convertV3ToV2 ( v2Requests , v3Response , currencyCodeMap )
419+ } , / N o d a t e f o u n d f o r B T C _ i s o : U S D / )
422420 } )
423421
424422 it ( 'should match correct date for crypto_crypto pairs' , ( ) => {
You can’t perform that action at this time.
0 commit comments