MyCrypto/spec/reducers/config/networks/staticNetworks.spec.ts
William O'Beirne c76d0b3fa5 Handle Gas / Estimates on a Per Network Basis (#1160)
* Give each network the ability to specify default estimates, and whether or not they should fetch estimates from API. Convert gas slider to always use estimates.

* Fix gas cache invalidation, invalid too high / low logic.

* Fix up tests.

* tscheck
2018-02-24 12:00:00 -06:00

18 lines
620 B
TypeScript

import { INITIAL_STATE, staticNetworks } from 'reducers/config/networks/staticNetworks';
describe('Testing contained data', () => {
it(`contain unique chainIds`, () => {
const networkValues = Object.values(INITIAL_STATE);
const chainIds = networkValues.map(a => a.chainId);
const chainIdsSet = new Set(chainIds);
expect(Array.from(chainIdsSet).length).toEqual(chainIds.length);
});
});
describe('static networks reducer', () => {
it('should return the initial state', () =>
expect(JSON.stringify(staticNetworks(undefined, {} as any))).toEqual(
JSON.stringify(INITIAL_STATE)
));
});