mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-12 20:14:12 +00:00
70a2b3ca9a
* Add disclaimer modal to footer * Remove duplicate code & unnecessary styles * Fix formatting noise * remove un-used css style * Fix tslint error & add media query for modals * Nest Media Query * Update Jest & Enzyme, Add snapshot tests * Fix tslint errors in /spec, Update mock localstorage * Update types in tests, Fix tslint error * Specify module versions for browser * Update sendTransaction snapshot
32 lines
863 B
TypeScript
32 lines
863 B
TypeScript
import { config, INITIAL_STATE } from 'reducers/config';
|
|
import * as configActions from 'actions/config';
|
|
import { NODES } from 'config/data';
|
|
|
|
describe('config reducer', () => {
|
|
it('should handle CONFIG_LANGUAGE_CHANGE', () => {
|
|
const language = 'en';
|
|
expect(config(undefined, configActions.changeLanguage(language))).toEqual({
|
|
...INITIAL_STATE,
|
|
languageSelection: language
|
|
});
|
|
});
|
|
|
|
it('should handle CONFIG_NODE_CHANGE', () => {
|
|
const node = Object.keys(NODES)[0];
|
|
|
|
expect(config(undefined, configActions.changeNode(node))).toEqual({
|
|
...INITIAL_STATE,
|
|
nodeSelection: node
|
|
});
|
|
});
|
|
|
|
it('should handle CONFIG_GAS_PRICE', () => {
|
|
const gasPrice = 20;
|
|
|
|
expect(config(undefined, configActions.changeGasPrice(gasPrice))).toEqual({
|
|
...INITIAL_STATE,
|
|
gasPriceGwei: gasPrice
|
|
});
|
|
});
|
|
});
|