updux/src/actions.test.js

18 lines
322 B
JavaScript

import { test } from 'tap';
import { action } from './actions.js';
test( 'action generators', async (t) => {
const foo = action('foo');
t.equal( foo.type, 'foo' );
t.same( foo(), { type: 'foo' } );
const bar = action('bar');
t.equal( bar.type, 'bar' );
t.same( bar(), { type: 'bar' } );
} )