12 lines
353 B
JavaScript
12 lines
353 B
JavaScript
import { test, expect } from 'vitest';
|
|
import Updux from './Updux.js';
|
|
test('subdux idempotency', () => {
|
|
const foo = new Updux({
|
|
subduxes: {
|
|
a: new Updux({ initialState: 2 }),
|
|
},
|
|
});
|
|
let fooState = foo.reducer(undefined, { type: 'noop' });
|
|
expect(foo.reducer(fooState, { type: 'noop' })).toBe(fooState);
|
|
});
|