need to have action magic thrown in

typescript
Yanick Champoux 2022-08-26 13:05:14 -04:00
parent d44986e990
commit 6a4525f507
1 changed files with 7 additions and 0 deletions

View File

@ -4,9 +4,16 @@ import { Updux } from './Updux.js';
test( "basic createStore", async () => {
const foo = new Updux({
initial: { a: 1 },
actions: {
a1: null,
}
});
const store = foo.createStore();
expect(store.getState()).toEqual({a:1});
console.log(store.actions.a1);
expect(store.actions.a1).toBeTypeOf('function');
});