UNPKG

@bhupinderanand/react-redux-saga-boilerplate

Version:
22 lines (18 loc) 650 B
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(); }); }); });