File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
test/blockfrost-providers Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const realAdaTestFileNames = [
2626module . exports = {
2727 projects : [
2828 { ...project ( 'blockfrost' ) , globalSetup : './test/blockfrost/setup.ts' } ,
29+ project ( 'blockfrost-providers' ) ,
2930 project ( 'local-network' ) ,
3031 project ( 'long-running' ) ,
3132 project ( 'ogmios' ) ,
Original file line number Diff line number Diff line change 2323 "load-test-custom:wallet-restoration" : " ts-node test/load-test-custom/wallet-restoration/wallet-restoration.test.ts" ,
2424 "test" : " echo 'test' command not implemented yet" ,
2525 "test:blockfrost" : " jest -c jest.config.js --forceExit --selectProjects blockfrost --runInBand --verbose" ,
26+ "test:blockfrost:providers" : " jest -c jest.config.js --forceExit --selectProjects blockfrost-providers --runInBand --verbose" ,
2627 "test:utils" : " jest -c jest.config.js --forceExit --selectProjects utils --verbose" ,
2728 "test:long-running" : " jest -c jest.config.js --forceExit --selectProjects long-running --runInBand --verbose" ,
2829 "test:local-network" : " jest -c jest.config.js --forceExit --selectProjects local-network --runInBand --verbose" ,
Original file line number Diff line number Diff line change 1+ // cSpell:ignore cardano utxos
2+
3+ import { NetworkInfoProvider } from '@cardano-sdk/core' ;
4+ import { logger } from '@cardano-sdk/util-dev' ;
5+ import { networkInfoHttpProvider } from '@cardano-sdk/cardano-services-client' ;
6+ import { toSerializableObject } from '@cardano-sdk/util' ;
7+
8+ // LW-11697 to enable this
9+ describe . skip ( 'Web Socket' , ( ) => {
10+ const legacyProvider = networkInfoHttpProvider ( { baseUrl : 'http://localhost:4000/' , logger } ) ;
11+ const provider = networkInfoHttpProvider ( { baseUrl : 'http://localhost:4001/' , logger } ) ;
12+
13+ const methods : ( keyof NetworkInfoProvider ) [ ] = [
14+ 'eraSummaries' ,
15+ 'genesisParameters' ,
16+ 'lovelaceSupply' ,
17+ 'protocolParameters' ,
18+ 'stake'
19+ ] ;
20+
21+ test . each ( methods ) ( 'compare %s' , async ( method ) => {
22+ const [ legacyResponse , response ] = await Promise . all ( [ legacyProvider [ method ] ( ) , provider [ method ] ( ) ] ) ;
23+
24+ expect ( toSerializableObject ( response ) ) . toEqual ( toSerializableObject ( legacyResponse ) ) ;
25+ } ) ;
26+ } ) ;
You can’t perform that action at this time.
0 commit comments