We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test("should safe correct reactions order for changing depth without modification", () => { const spy = jest.fn(); const a = mut(0); const b = mut(0); const m0 = comp(() => { return !b.val ? a.val : k0.val; }); const k0 = comp(() => { return !b.val ? m0.val : a.val; }); const m = comp(() => m0.val); const k = comp(() => k0.val); let i = 0; run(() => (k.val, spy('k', i++))); run(() => (m.val, spy('m', i++))); expect(spy).toHaveBeenNthCalledWith(1, 'k', 0); expect(spy).toHaveBeenNthCalledWith(2, 'm', 1); expect(spy).toBeCalledTimes(2); spy.mockReset(); a.val = 1; expect(spy).toHaveBeenNthCalledWith(1, 'm', 2); expect(spy).toHaveBeenNthCalledWith(2, 'k', 3); expect(spy).toBeCalledTimes(2); spy.mockReset(); // switch b.val = 1; expect(spy).toBeCalledTimes(0); // check a.val = 2; // TODO: check failed (m:4, k:5) // expect(spy).toHaveBeenNthCalledWith(1, 'k', 4); // expect(spy).toHaveBeenNthCalledWith(2, 'm', 5); expect(spy).toBeCalledTimes(2); spy.mockReset(); });
d80be9c#diff-a9b84960a146958d9aecb5cbe3fccdf262c40fe07bddbb659f63d8a7766ed3a5R203-R245
The text was updated successfully, but these errors were encountered:
Reactions order in mobx on codesandbox strange too)
Sorry, something went wrong.
No branches or pull requests
d80be9c#diff-a9b84960a146958d9aecb5cbe3fccdf262c40fe07bddbb659f63d8a7766ed3a5R203-R245
The text was updated successfully, but these errors were encountered: