-
My tests are timeouting, but I don't understand why. Here is the sample: Model: import { types, flow, getRoot } from 'mobx-state-tree';
const Model = types
.model('View', {})
.actions(self => ({
asyncAction: flow(function* () {
return yield Promise.resolve(true);
}),
})); Test: it("Should call", (done) => {
const store = Model.create();
store.asyncAction().then(() => {
console.log("here i am") // never executed
done()
})
}); |
Beta Was this translation helpful? Give feedback.
Answered by
zorgick
Jul 26, 2022
Replies: 1 comment
-
My bad) The problem was in Jest config. This rule was breaking the flow execution: fakeTimers: {
enableGlobally: true,
}, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zorgick
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My bad) The problem was in Jest config. This rule was breaking the flow execution: