Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

I could successfully migrate my Angular 20/Jasmine/Karma app to Angula r21/Vitest All my tests are running correctly, except the ones that use debounceTime from RxJS As a workaround for now, ny unit ...
Paulo Costa's user avatar
0 votes
1 answer
36 views

While I was able to get my C# code running in the browser as WebAssembly, I get errors like this when trying to run any (vitest) unit tests that load the module that initializes .NET: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯...
Qwertie's user avatar
  • 17.4k
-4 votes
0 answers
52 views

I am using Vitest in browser mode, with Playwright as the provider. Whenever a test fails, a screenshot of the failed test is created in __screenshots__/<filename>/<test-name>. I am unsure ...
Joe's user avatar
  • 409
0 votes
0 answers
55 views

When writing a Vitest config file in TypeScript, type errors don't seem to be caught. How to change that (and thus benefit from type checking if an option property is wrong)? Here's an example vitest....
Quentin's user avatar
  • 1,173
0 votes
1 answer
109 views

I'm testing components built with shadcn/ui, which uses Radix UI under the hood. When running UI interaction tests using Vitest and @testing-library/user-event, I keep getting the following error: ...
Palladio's user avatar
0 votes
1 answer
43 views

I am struggling adding mocked methods when testing a Pinia store's functionality. There is very little documentation relating to actually testing the stores themselves, as most Pinia's official ...
Vampuuri's user avatar
-1 votes
1 answer
57 views

In a large Vue 3 app, we have some helper modules that are imported into various components. One of these helpers returns the root node, which itself contains many other methods. In the app calls to ...
danwellman's user avatar
  • 9,401
0 votes
1 answer
90 views

I’m trying to run Vitest with the UI enabled using: "scripts": { "test:ui": "vitest --ui" } When I run it with: npm run test:ui I get the following error: Error: ...
Cary Bondoc's user avatar
  • 3,016
0 votes
2 answers
72 views

I’m trying to write a Vitest unit test for an auto-save feature in a Svelte 5 project. The test sets meta.settings.autoSaveIntervalMs = 50 so the save cycle finishes quickly, but the $effect still ...
henrymattel's user avatar
-4 votes
1 answer
66 views

When I use: describe("ExtractDateFromText", () => { test.for(scannedReceiptText)('Filename %s', async (expected) => { const dateResult = dateFromRawData(...
Mark Levison's user avatar
0 votes
0 answers
19 views

I have a Vite app and configured a domain - say https://abcd.io:5173 - as a domain and certificates are generated for this domain. Now I would like to use MSW for testing. But when I try to enable ...
Abhilash D K's user avatar
  • 1,329
0 votes
1 answer
91 views

I'm trying to test (using Vitest) a part of my Fastify app that uses @fastify/websocket (and transitively ws), but my tests keep timing out despite running to completion. Here's a relevant excerpt ...
JesseTG's user avatar
  • 2,195
62 votes
7 answers
52k views

I have a vue3 project using Vite/Vitest, as recommanded in Vue.js documentation. Here is the structure of the project: src components // my Vue components here, potentially in sub-folders. For ...
Eria's user avatar
  • 3,253
0 votes
0 answers
178 views

I ran the following commands in sveltekit to create a new project npx sv create ch_ui I selected the following options ┌ Welcome to the Svelte CLI! (v0.8.20) │ ◇ Which template would you like? │ ...
PirateApp's user avatar
  • 6,362
1 vote
1 answer
51 views

In my snapshot, I have objects of the following format: { "meanElements": { "Om": 2.2835713400168607, "am": 1.3043985097733939, "em": 0.166565, ...
1valdis's user avatar
  • 1,144
-1 votes
2 answers
256 views

While trying to execute unit tests with Vitest through Yarn in my Angular app I have an error about 'rollup' package : yarn run test [INFO] failed to load config from xxx\angular-test\vitest.config.ts ...
Benjamin C's user avatar
10 votes
5 answers
15k views

I have this Vitest test: import React from 'react'; import { expect, it, vi } from 'vitest'; import { render, screen } from '@testing-library/react'; import { StyledNativeTimePicker } ...
Chen Peleg's user avatar
  • 3,190
0 votes
0 answers
248 views

I am using React version 19 with Vite and when run Vitest, it's giving error FAIL src/components/UserPopover/UserPopover.test.tsx > UserPopover > calls only onCancel when "Cancel&...
Anand Deep Singh's user avatar
-1 votes
1 answer
40 views

I was facing this exact error every time I tried to run a Nest project locally via VSCode and I didn't find anything related to it on the internet, so I'm gonna post a question and the answer I found ...
King Witcher's user avatar
0 votes
1 answer
77 views

I was going over Road to React (the book by Robin Wieruch), and I encountered a confusing piece of code. The code is on the Testing chapter, page 227: describe('App', () => { it('succeeds ...
Taofeek's user avatar
  • 53
26 votes
4 answers
33k views

I'm starting out with Vite for a React application but unable to get jest tests working. I am trying to use Vitest with experimental ES module. I am getting: FAIL src/App.test.tsx [ src/App.test.tsx ]...
Michael Durrant's user avatar
5 votes
0 answers
721 views

My project folder structure is this: -frontend -src -components -__test__ -pages -dialogs - etc in __test__ folder there are all the test cases for components like ...
Muhammad Ahsan's user avatar
5 votes
1 answer
2k views

I have a Storybook setup using vitest, and I want to mock a module in a story by way of vitest, so I add the following to the top of my stories-file: // my-nice-function.stories.tsx import { vi } from ...
Maffelu's user avatar
  • 2,128
12 votes
5 answers
13k views

Adding 'jsdom' to vite.config.ts brings the following error: No overload matches this call. The last overload gave the following error. Argument of type '{ plugins: PluginOption[][]; test: { ...
Harry Chaklader's user avatar
3 votes
1 answer
366 views

this is my first post — I'm new to both Stack Overflow and SvelteKit. I'm trying to test a Svelte 5 Navbar component that conditionally shows links/buttons based on: page.data.user — if the user is ...
InternationalBonus16's user avatar

1
2 3 4 5
19