Skip to content

Clarify nextTick section of getting-started guide #86

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
Oct 11, 2017

Conversation

skray
Copy link
Contributor

@skray skray commented Oct 11, 2017

Following up on #83, clarify getting started guide to explain that nextTick is not necessary when testing DOM updates, but it is still needed for operations that require advancing the event loop.

Following up on vuejs#83, clarify getting started guide to explain that `nextTick` is not necessary when testing DOM updates, but it is still needed for operations that require advancing the event loop.
To simplify usage, `vue-test-utils` applies all updates synchronously so you don't need to use `Vue.nextTick` in your tests.
To simplify usage, `vue-test-utils` applies all updates synchronously so you don't need to use `Vue.nextTick` to test DOM updates in your tests.

`nextTick` is still necessary when you need to explictly advance the event loop, for operations such as asynchronous callbacks or promise resolution.
Copy link
Member

Choose a reason for hiding this comment

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

Can you add it in a note. Like this:

*Note: lorem ipsum ...*

Copy link
Member

@eddyerburgh eddyerburgh left a comment

Choose a reason for hiding this comment

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

Please add it as a note

- Putting change in a *Note: *
- Changing wording, "to test DOM updates in your tests" felt awkward.
@skray
Copy link
Contributor Author

skray commented Oct 11, 2017

Ok, moved it into a note, and fixed what I thought was some awkward wording in my first pass. Let me know if you'd like any more/less explanation, examples, etc.

@eddyerburgh eddyerburgh merged commit eef3792 into vuejs:dev Oct 11, 2017
@skray skray mentioned this pull request Oct 18, 2017
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.

2 participants