Skip to content

Commit 43523c8

Browse files
committed
nocks
1 parent c6d6ada commit 43523c8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

v1/packages/client/__tests__/client-mock.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import nock from 'nock';
33
import { ChainRegistryClient } from '../src/registry';
44
import { assets, chains } from '../test-utils';
55

6-
const baseUrl = 'https://raw.githubusercontent.com';
6+
const baseUrl = 'https://raw.githubusercontent.com/chain-registry/chain-registry/main/registries/original';
7+
78

89
function nockByChainName(chainName: string) {
910
const chainDataPath = `/cosmos/chain-registry/master/${chainName}/chain.json`;

v2/packages/client/setup-jest.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import nock from 'nock';
22

33
import { assetLists, chains, ibc } from './test-utils';
44

5-
const baseUrl = 'https://raw.githubusercontent.com';
6-
5+
const baseUrl = 'https://raw.githubusercontent.com/chain-registry/chain-registry/main/registries/full';
76

87
beforeAll(() => {
98
// 'https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/chain.json',
@@ -13,35 +12,35 @@ beforeAll(() => {
1312
// 'https://raw.githubusercontent.com/cosmos/chain-registry/master/_IBC/juno-osmosis.json',
1413
// 'https://raw.githubusercontent.com/cosmos/chain-registry/master/_IBC/osmosis-secretnetwork.json'
1514
nock(baseUrl)
16-
.get('/cosmos/chain-registry/master/osmosis/chain.json')
15+
.get('/osmosis/chain.json')
1716
.reply(200, chains.find(c => c.chainName === 'osmosis'));
1817
nock(baseUrl)
19-
.get('/cosmos/chain-registry/master/osmosis/assetlist.json')
18+
.get('/osmosis/assetlist.json')
2019
.reply(200, assetLists.find(c => c.chainName === 'osmosis'));
2120

2221
nock(baseUrl)
23-
.get('/cosmos/chain-registry/master/stargaze/chain.json')
22+
.get('/stargaze/chain.json')
2423
.reply(200, chains.find(c => c.chainName === 'stargaze'));
2524
nock(baseUrl)
26-
.get('/cosmos/chain-registry/master/stargaze/assetlist.json')
25+
.get('/stargaze/assetlist.json')
2726
.reply(200, assetLists.find(c => c.chainName === 'stargaze'));
2827

2928
nock(baseUrl)
30-
.get('/cosmos/chain-registry/master/juno/chain.json')
29+
.get('/juno/chain.json')
3130
.reply(200, chains.find(c => c.chainName === 'juno'));
3231
nock(baseUrl)
33-
.get('/cosmos/chain-registry/master/juno/assetlist.json')
32+
.get('/juno/assetlist.json')
3433
.reply(200, assetLists.find(c => c.chainName === 'juno'));
3534

3635
nock(baseUrl)
37-
.get('/cosmos/chain-registry/master/secretnetwork/assetlist.json')
36+
.get('/secretnetwork/assetlist.json')
3837
.reply(200, assetLists.find(c => c.chainName === 'secretnetwork'));
3938

4039
nock(baseUrl)
41-
.get('/cosmos/chain-registry/master/_IBC/juno-osmosis.json')
40+
.get('/_IBC/juno-osmosis.json')
4241
.reply(200, ibc.find(i => i.chain1.chainName === 'juno' && i.chain2.chainName==='osmosis'));
4342
nock(baseUrl)
44-
.get('/cosmos/chain-registry/master/_IBC/osmosis-secretnetwork.json')
43+
.get('/_IBC/osmosis-secretnetwork.json')
4544
.reply(200, ibc.find(i => i.chain1.chainName === 'osmosis' && i.chain2.chainName==='secretnetwork'));
4645
});
4746

0 commit comments

Comments
 (0)