GitShow/vuejs/vue-test-utils
vuejs

vue-test-utils

Component Test Utils for Vue 2

by vuejs
Star on GitHubForkWebsitenpm

JavaScript

3.5k stars654 forks316 contributorsQuiet · 2y agoSince 2017v1.3.6MIT

Meet the team

See all 316 on GitHub →
eddyerburgh
eddyerburgh587 contributions
lmiller1990
lmiller1990145 contributions
38elements
38elements115 contributions
Jinjiang
Jinjiang40 contributions
yyx990803
yyx99080339 contributions
dependabot[bot]Bot
dependabot[bot]30 contributions
dobromir-hristov
dobromir-hristov21 contributions
afontcu
afontcu16 contributions

Languages

View on GitHub →
JavaScript94%
Vue3.3%
TypeScript2.3%
Shell0.4%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
62
✓README✓License✓Contributing○Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Quiet · Last activity 2y ago
See all on GitHub →
DesselBane
VueTestUtilsConfigOptions provide type is not allowing symbols as keysOpenIssue

Subject of the issue When defining global provides using a Symbol / vues type there is a type error. Steps to reproduce Expected behaviour Symbols should be supported in the type, as they work at runtime. Actual behaviour TS Error Possible Solution https://github.com/vuejs/vue-test-utils/blob/9627a809a177ef9798ca66a669891c73fc740d8d/packages/test-utils/types/index.d.ts#L183 I think changing the type here would suffice

DesselBane · 1mo ago
DesselBane
fix #2108 Options `provide` should allow symbol keysOpenPR

What kind of change does this PR introduce? (check at least one) [x] Bugfix [ ] Feature [ ] Code style update [ ] Refactor [ ] Build-related changes [ ] Other, please describe: Does this PR introduce a breaking change? (check one) [ ] Yes [x] No If yes, please describe the impact and migration path for existing applications: The PR fulfills these requirements: [x] It's submitted to the branch. [x] When resolving a specific issue, it's referenced in the PR's title (e.g. , where "xxx" is the issue number) [x] All tests are passing: https://github.com/vuejs/vue-test-utils/blob/dev/.github/CONTRIBUTING.md#development-setup [x] New/updated tests are included Other information: Fixes #2108

DesselBane · 10mo ago
MrShnaider
Submit a form using a submit button does not trigger handler functionOpenIssue

Subject of the issue I was trying to reproduce a simple scenario. The component contains an and a , wrapped by . The text is entered in the field, and when you click on the , the is submited and the text is deleted. However, after clicking on the does not submit and test fails. Steps to reproduce Expected behaviour If I click on button I expect that form would be submitted and handler function would be called Actual behaviour Handler function was not called Possible Solution I tried to bind components to the DOM using and read the "Form Handling" documentation. None of this helped. If there are exceptions to this behavior, you need to add them to the "Form Handling" documentation

MrShnaider · 10mo ago

Recent fixes

View closed PRs →
yshrsmz
docs: update deprecation warning for find method in Japanese translationMergedPR

What kind of change does this PR introduce? (check at least one) [ ] Bugfix [ ] Feature [ ] Code style update [ ] Refactor [ ] Build-related changes [x] Other, please describe: In the Japanese translation for and , deprecation warnings do not mention that we can still use these methods when we pass selectors. Below is the English version of the corresponding documentation. https://github.com/vuejs/vue-test-utils/blob/dev/docs/api/wrapper/find.md https://github.com/vuejs/vue-test-utils/blob/dev/docs/api/wrapper/findAll.md Does this PR introduce a breaking change? (check one) [ ] Yes [x] No If yes, please describe the impact and migration path for existing applications: The PR fulfills these requirements: [x] It's submitted to the branch. [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. , where "xxx" is the issue number) [x] All tests are passing: https://github.com/vuejs/vue-test-utils/blob/dev/.github/CONTRIBUTING.md#development-setup [x] New/updated tests are included If adding a new feature, the PR's description includes: [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it) Other information:

yshrsmz · 2mo ago
jolting
TypeError: Cannot read properties of undefined (reading 'devtoolsRawSetupState')ClosedIssue

Subject of the issue Beginning with Vue 3.2.25 and the latest version of vue-test-utils I started running into this error on some calls to . The problem isn't observed with Vue 3.2.24. Steps to reproduce I don't have an example test case yet. This happens in a larger project. I will need to narrow down the cause first. Expected behaviour should not throw the error Actual behaviour sometimes throws an error. Possible Solution Downgrade to Vue 3.2.24

jolting · 7mo ago
kanteankit
Test case to check if a method was called in `mounted` hook fails, when stubbed using `jest.fn()`ClosedIssue

Version 1.0.0-beta.25 Reproduction link https://codesandbox.io/s/rw83wwvzym Steps to reproduce Create a Vuejs component having a method and call that method in the hook In your test case, the component and stub the using Write a test case that checks if the method was called using What is expected? The test case should pass What is actually happening? The test case fails with the error message

kanteankit · 10mo ago
Structured data for AI agents

Repository: vuejs/vue-test-utils. Description: Component Test Utils for Vue 2 Stars: 3545, Forks: 654. Primary language: JavaScript. Languages: JavaScript (94%), Vue (3.3%), TypeScript (2.3%), Shell (0.4%). License: MIT. Homepage: https://vue-test-utils.vuejs.org Latest release: v1.3.6 (3y ago). Open PRs: 8, open issues: 124. Last activity: 2y ago. Community health: 62%. Top contributors: eddyerburgh, lmiller1990, 38elements, Jinjiang, yyx990803, dependabot[bot], dobromir-hristov, afontcu, Austio, JessicaSachs and others.

·@ofershap

Replace github.com with gitshow.dev