2018-02-24 18:00:00 +00:00
|
|
|
import { INITIAL_STATE, staticNetworks } from 'reducers/config/networks/staticNetworks';
|
2018-02-12 20:43:07 +00:00
|
|
|
|
|
|
|
describe('Testing contained data', () => {
|
|
|
|
it(`contain unique chainIds`, () => {
|
2018-02-24 18:00:00 +00:00
|
|
|
const networkValues = Object.values(INITIAL_STATE);
|
2018-02-12 20:43:07 +00:00
|
|
|
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(
|
2018-02-24 18:00:00 +00:00
|
|
|
JSON.stringify(INITIAL_STATE)
|
2018-02-12 20:43:07 +00:00
|
|
|
));
|
|
|
|
});
|