From 9d13227ea93f1224a5a3f79d19859d4cd1b17fda Mon Sep 17 00:00:00 2001 From: JR Date: Wed, 22 Jul 2020 17:52:29 +0200 Subject: [PATCH] docs(testing): removed sync mode from vueTestUtils Removed sync mode from vueTestUtils, since (it has been removed)[https://github.com/vuejs/vue-test-utils/issues/1137]. Also add the import of flushPromises(). It took quite some time to find out that it was an external package. --- docs/advanced/testing.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/advanced/testing.md b/docs/advanced/testing.md index 2026b6792..4b2fc239b 100644 --- a/docs/advanced/testing.md +++ b/docs/advanced/testing.md @@ -25,17 +25,12 @@ transformIgnorePatterns: [ The following examples will use vue-test-utils API to conduct the tests. ::: -VeeValidate is primarily asynchronous, so you would need to disable vue-test-utils sync mode. And you will use flush-promises to wait for the updated to take effect. - -To disable the sync mode, when mounting the component set the sync option to false in the mounting options. - -```js -const wrapper = mount(MyComponent, { sync: false }); -``` After triggering an event like an input event, make sure to call flushPromises before checking the UI for changes: ```js +import flushPromises from 'flush-promises' + await flushPromises(); ```