For some reason, neither flushPromises nor nextTick worked when testing watchers, making setTimeout the only possible way to test side-effects on reactive properties.
There should be a better way to do that without timeout functions.
Maybe Vue libraries can give us a hint as to how to test that.
For some reason, neither
flushPromises
nornextTick
worked when testing watchers, makingsetTimeout
the only possible way to test side-effects on reactive properties. There should be a better way to do that without timeout functions. Maybe Vue libraries can give us a hint as to how to test that.