14 lines
321 B
JavaScript
14 lines
321 B
JavaScript
import { action } from './actions.js';
|
|
|
|
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' });
|
|
});
|