Skip to content

fix: wait for the next tick #1387

New issue

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

Merged
merged 2 commits into from
Jan 3, 2020
Merged

fix: wait for the next tick #1387

merged 2 commits into from
Jan 3, 2020

Conversation

suits-at
Copy link
Contributor

@suits-at suits-at commented Jan 2, 2020

according to https://vue-test-utils.vuejs.org/guides/#using-nexttick we have to wait for the next tick for this test to pass

according to https://vue-test-utils.vuejs.org/guides/#using-nexttick we have to wait for the next tick for this test to pass
@@ -148,13 +148,15 @@ Create a file in `src` named `Counter.vue`:
And create a test file named `test/Counter.spec.js` with the following code:

```js
import Vue from 'vue';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Prettier is complaining about this semicolon. yarn run format will fix it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also use wrapper.vm.$nextTick(), but this could be a bit more future proof, as nextTick will no longer be avail on the vm in V3...

Copy link
Collaborator

@JessicaSachs JessicaSachs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding and fixing this! There is a small formatting change needed before merging. You can exec prettier via yarn run format.

We might run the linter as a githook to avoid this problem in the future.

@dobromir-hristov
Copy link
Contributor

I can add prettier to run auto on my commit lint branch.

@lmiller1990 lmiller1990 self-requested a review January 3, 2020 07:19
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once prettier is run

@lmiller1990 lmiller1990 merged commit e171f58 into vuejs:dev Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants