initial test

This commit is contained in:
Yanick Champoux 2021-10-08 20:22:04 -04:00
parent d61c9478a2
commit 5eeb4d4ab7
2 changed files with 12 additions and 15 deletions

12
src/initial.test.js Normal file
View File

@ -0,0 +1,12 @@
import tap from 'tap';
import { Updux } from './Updux.js';
const foo = new Updux({
initial: { root: 'abc' },
subduxes: {
bar: new Updux({ initial: 123 }),
},
});
tap.same(foo.initial, { root: 'abc', bar: 123 });

View File

@ -1,15 +0,0 @@
import { dux } from '.';
import tap from 'tap';
const foo = dux({
initial: { root: 'abc' },
coduxes: [
dux({ initial: { co: 'works' } }),
dux({ initial: { co2: 'works' } }),
],
subduxes: {
bar: dux({ initial: 123 }),
},
});
tap.same(foo.initial, { root: 'abc', co: 'works', co2: 'works', bar: 123 });