Skip to main content
Filter by
Sorted by
Tagged with
8 votes
1 answer
29k views

I'm playing around with Vitest and want to wait for the completion of a couple mocked fetches in the onMounted lifecycle hook in my component: My test: import { mount } from '@vue/test-utils'; import ...
WillD's user avatar
  • 6,842
6 votes
1 answer
14k views

I am running a vue3 application using the Composition API and the setup() hook. I am using Vitest as unit-test framework. (v 0.6.1) I have the following sample component : // src/components/...
Deltantoine's user avatar
0 votes
1 answer
1k views

I have a form that contains a selector reusable component like this <template> <div class="channelDetail" data-test="channelDetail"> <div class="row"&...
Ali Ghafoori's user avatar
1 vote
1 answer
5k views

I'm trying to test a React node with React, Vitest and Testing Library, but the formatting from the innerHTML makes it not match. How I can avoid the formatting for testing cases? - Expected - 3 +...
Andre Bongartz's user avatar
2 votes
1 answer
1k views

I'm facing this issue in this Vite started repository. https://github.com/vicainelli/vite-starter I'm using Vite + Preact + Vitest + Testing Library If I'm testing any code inside the codebase, it ...
Vinicius Cainelli's user avatar
1 vote
2 answers
3k views

I am running Vue3 with vite and can't write any tests for components that use the ElementPlus library. Something else needs to be injected apparently but I don't know how to do that. I have the ...
GeeWhizBang's user avatar
0 votes
0 answers
5k views

I've been trying out vitest, but I've gotten stuck when i tried to run tests on a component that utilizes the PokeAPI. I figured creating a mock setup would fix it, but to no avail. The component that ...
Cryptorian420's user avatar
3 votes
1 answer
5k views

I have been trying to integrate Vitest with a project that implements Quasar but I have not succeed doing so. The main problem that I am facing when testing is that quasar components are not rendering ...
Daniel Parra Gonzalez's user avatar
13 votes
2 answers
15k views

Running npm init vue@latest with the following setup generates a Vitest spec file inside the src directory. I'm wondering why Cypress e2e tests have a seperate directory and Vitest unit tests are ...
user avatar
1 vote
0 answers
312 views

Just created a local project using npm init vue@3 using the option vitest. After installing the packages when executing cmd yarn test:unit it throws following errors: $ yarn test:unit yarn run v1.22....
coure2011's user avatar
  • 42.8k

1
15 16 17 18
19