eddyerburgh/vue-digital-clock

Cannot use setTimeout in tests

Closed this issue · 1 comments

Hey, I found your repo looking for an Avoriaz example that needed tests to wait for vue updates.

The solution you've got in your tests using setTimeout does not work. For example, if you add:

setTimeout(() => expect(false).to.be.true, 1000);

to one of your tests, the test will still pass.

Hey, thanks.

I've fixed the async tests.

You can call wrapper.update() to update the Vue component.