need to have action magic thrown in
This commit is contained in:
parent
d44986e990
commit
6a4525f507
@ -4,9 +4,16 @@ import { Updux } from './Updux.js';
|
|||||||
test( "basic createStore", async () => {
|
test( "basic createStore", async () => {
|
||||||
const foo = new Updux({
|
const foo = new Updux({
|
||||||
initial: { a: 1 },
|
initial: { a: 1 },
|
||||||
|
actions: {
|
||||||
|
a1: null,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const store = foo.createStore();
|
const store = foo.createStore();
|
||||||
|
|
||||||
expect(store.getState()).toEqual({a:1});
|
expect(store.getState()).toEqual({a:1});
|
||||||
|
|
||||||
|
console.log(store.actions.a1);
|
||||||
|
|
||||||
|
expect(store.actions.a1).toBeTypeOf('function');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user