fix(core): serialize state mutations, fix batch flushing/reentrancy, handle falsy initial values, dispose old StatePart on force, and improve notification/error handling
This commit is contained in:
@@ -40,8 +40,10 @@ tap.test('should dispatch a state action', async (tools) => {
|
||||
const done = tools.defer();
|
||||
const addFavourite = testStatePart.createAction<string>(async (statePart, payload) => {
|
||||
const currentState = statePart.getState();
|
||||
currentState.currentFavorites.push(payload);
|
||||
return currentState;
|
||||
return {
|
||||
...currentState,
|
||||
currentFavorites: [...currentState.currentFavorites, payload],
|
||||
};
|
||||
});
|
||||
testStatePart
|
||||
.waitUntilPresent((state) => {
|
||||
|
||||
Reference in New Issue
Block a user