fix broken tests

This commit is contained in:
Chris Kruining 2025-02-04 16:49:13 +11:00
parent 99c2df1bfa
commit 57b10f8e96
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
2 changed files with 6 additions and 2 deletions

View file

@ -100,6 +100,8 @@ export const createDataSet = <T extends Record<string, any>>(data: Accessor<T[]>
});
const apply = (data: T[], mutations: Mutation[]) => {
console.log('APPLY', data, mutations);
for (const mutation of mutations) {
const path = mutation.key.split('.');
@ -162,6 +164,8 @@ export const createDataSet = <T extends Record<string, any>>(data: Accessor<T[]>
const next = data();
const nextValue = apply(deepCopy(next), untrack(() => mutations()));
console.log('EFFECT IS CALLED');
setState('value', nextValue);
setState('snapshot', next);
});