Browse Source
fix(multi-lang): switch ticker to settings store fix(tests): pass all tests fix(fiat): switch from usd to fiat fix(settings): fix console errors fix(settings): make styles consistent fix(tests): remove unneeded mocks fix(payform): call satoshisToFiat now fix(network): rebase + fix network fiat amtrenovate/lint-staged-8.x
28 changed files with 332 additions and 64 deletions
@ -0,0 +1,29 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`reducers settingsReducer should correctly disableSubmenu 1`] = ` |
|||
Object { |
|||
"activeSubMenu": null, |
|||
"settingsOpen": false, |
|||
} |
|||
`; |
|||
|
|||
exports[`reducers settingsReducer should correctly setActiveSubmenu 1`] = ` |
|||
Object { |
|||
"activeSubMenu": true, |
|||
"settingsOpen": false, |
|||
} |
|||
`; |
|||
|
|||
exports[`reducers settingsReducer should correctly setSettingsOpen 1`] = ` |
|||
Object { |
|||
"activeSubMenu": null, |
|||
"settingsOpen": true, |
|||
} |
|||
`; |
|||
|
|||
exports[`reducers settingsReducer should handle initial state 1`] = ` |
|||
Object { |
|||
"activeSubMenu": null, |
|||
"settingsOpen": false, |
|||
} |
|||
`; |
@ -0,0 +1,41 @@ |
|||
import settingsReducer, { |
|||
SET_SETTINGS_OPEN, |
|||
SET_ACTIVE_SUBMENU, |
|||
DISABLE_SUBMENU |
|||
} from 'reducers/settings' |
|||
|
|||
describe('reducers', () => { |
|||
describe('settingsReducer', () => { |
|||
it('should handle initial state', () => { |
|||
expect(settingsReducer(undefined, {})).toMatchSnapshot() |
|||
}) |
|||
|
|||
it('should have SET_SETTINGS_OPEN', () => { |
|||
expect(SET_SETTINGS_OPEN).toEqual('SET_SETTINGS_OPEN') |
|||
}) |
|||
|
|||
it('should have SET_ACTIVE_SUBMENU', () => { |
|||
expect(SET_ACTIVE_SUBMENU).toEqual('SET_ACTIVE_SUBMENU') |
|||
}) |
|||
|
|||
it('should have DISABLE_SUBMENU', () => { |
|||
expect(DISABLE_SUBMENU).toEqual('DISABLE_SUBMENU') |
|||
}) |
|||
|
|||
it('should correctly setSettingsOpen', () => { |
|||
expect( |
|||
settingsReducer(undefined, { type: SET_SETTINGS_OPEN, settingsOpen: true }) |
|||
).toMatchSnapshot() |
|||
}) |
|||
|
|||
it('should correctly setActiveSubmenu', () => { |
|||
expect( |
|||
settingsReducer(undefined, { type: SET_ACTIVE_SUBMENU, activeSubMenu: true }) |
|||
).toMatchSnapshot() |
|||
}) |
|||
|
|||
it('should correctly disableSubmenu', () => { |
|||
expect(settingsReducer(undefined, { type: DISABLE_SUBMENU })).toMatchSnapshot() |
|||
}) |
|||
}) |
|||
}) |
Loading…
Reference in new issue