Skip to content
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

Default props modified between tests suites #393

Closed
Alex-Sokolov opened this issue Jan 29, 2018 · 2 comments · Fixed by #613
Closed

Default props modified between tests suites #393

Alex-Sokolov opened this issue Jan 29, 2018 · 2 comments · Fixed by #613

Comments

@Alex-Sokolov
Copy link
Contributor

Version

1.0.0-beta.11

Reproduction link

https://jsfiddle.net/bqtfqwpw/

Steps to reproduce

Tested component: https://jsfiddle.net/g7s289sh/
Tests suites: https://jsfiddle.net/bqtfqwpw/

  1. Install vue/test-utils 1.0.0-beta.10
  2. Run tests => All ok
  3. Update vue/test-utils to 1.0.0-beta.11
  4. Run tests => Test fails

What is expected?

Tests passed

What is actually happening?

Tests failed
image


Looks like vue/test-utils shared default props between test suites

@LinusBorg
Copy link
Member

We should probably do a deep-clone here;
https://github.com/vuejs/vue-test-utils/blob/dev/src/lib/create-instance.js#L51

@eddyerburgh
Copy link
Member

The problem with doing a deep clone is that we wouldn't be able to use stubs passed in propsData 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants