1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 12:47:14 +01:00
metamask-extension/test/unit/actions/warning.test.js

25 lines
663 B
JavaScript
Raw Normal View History

import assert from 'assert';
import freeze from 'deep-freeze-strict';
import * as actions from '../../../ui/app/store/actions';
import reducers from '../../../ui/app/ducks';
2017-05-04 23:35:10 +02:00
describe('action DISPLAY_WARNING', function () {
it('sets appState.warning to provided value', function () {
const initialState = {
appState: {},
};
freeze(initialState);
const warningText = 'This is a sample warning message';
const action = actions.displayWarning(warningText);
const resultingState = reducers(initialState, action);
2020-11-03 00:41:28 +01:00
assert.equal(
resultingState.appState.warning,
warningText,
'warning text set',
);
});
});