UNPKG

@hyperlane-xyz/sdk

Version:

The official SDK for the Hyperlane Network

21 lines 1.04 kB
import { expect } from 'chai'; import { TestChainName, test1 } from '../consts/testChains.js'; import { MultiProtocolProvider } from '../providers/MultiProtocolProvider.js'; describe('MultiProtocolProvider', () => { describe('constructs', () => { it('creates a multi protocol provider without type extension', async () => { const multiProvider = new MultiProtocolProvider({ test1 }); const metadata = multiProvider.getChainMetadata(TestChainName.test1); expect(metadata.name).to.equal(TestChainName.test1); }); it('creates a multi protocol provider with type extension', async () => { const multiProvider = new MultiProtocolProvider({ test1: { ...test1, foo: '0x123', bar: 1 }, }); const metadata = multiProvider.getChainMetadata(TestChainName.test1); expect(metadata.foo).to.equal('0x123'); expect(metadata.bar).to.equal(1); }); }); }); //# sourceMappingURL=MultiProtocolProvider.test.js.map