@bhupinderanand/react-redux-saga-boilerplate
Version:
Boilerplate with React and Redux with Redux Saga
22 lines (18 loc) • 650 B
text/typescript
import { hideAlert, showAlert } from 'actions/alerts';
describe('actions/alerts', () => {
describe('showAlert', () => {
it('should return an action with variant `error`', () => {
expect(showAlert('Alright!', { id: 'test', variant: 'danger' })).toMatchSnapshot();
});
it('should return an action with variant `success`', () => {
expect(
showAlert('Alright!', { id: 'test', variant: 'success', timeout: 10 }),
).toMatchSnapshot();
});
});
describe('hideAlert', () => {
it('should return an action', () => {
expect(hideAlert('test')).toMatchSnapshot();
});
});
});