updux/src/actions.test.js

14 lines
314 B
JavaScript

import { action } from './actions';
test('action generators', () => {
const foo = action('foo');
expect(foo.type).toEqual('foo');
expect(foo()).toMatchObject({ type: 'foo' });
const bar = action('bar');
expect(bar.type).toEqual('bar');
expect(bar()).toMatchObject({ type: 'bar' });
});