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 ...
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....
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 ...
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? │ ...
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&...
0 votes
0 answers
56 views

I recently experienced a memory leak in my jest with ts-node tests in my Nestjs project. After debugging, all evidence pointed towards jest being the issue so I started to migrate to vitest, following ...
0 votes
0 answers
34 views

I have a Nuxt composable that fetches data from Contentful using the contentful client's getEntries function. It's working on the frontend of my website but when I run my tests i'm getting: TypeError: ...
0 votes
0 answers
541 views

I can run my Vitest usually, but when I try to import a react native link, it breaks with the error below: RollupError: Parse failure: Expected 'from', got 'typeof' At file: /mobile-app/node_modules/...
4 votes
0 answers
266 views

Recently I read about new hook useSuspenseQuery provided in @tanstack/react-query v5. Previously I have used useQuery and have written unit tests on it. I am trying to write unit tests on ...
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 ...
0 votes
0 answers
87 views

I am trying to set up unit tests for a frontend project. Currently, i am trying to use vitest, since we use vite as well. Additionally i am going with HappyDom and TestingLibrary. Now, i am facing a ...
0 votes
0 answers
70 views

My original app is based on the VS template ASP.NET React.ts (It has Vite). I am testing a frontend part in VSCode using Vitest (it is my first time using Vitest), but it seems I cannot correctly ...
1 vote
0 answers
102 views

for a Nuxt.JS project I have this coverage: As you can see, only a few of my components are tested (green), while the rest are not impacted by any tests I run. Even components like ColorPalette or ...
0 votes
0 answers
168 views

TL;DR I want to run my unit tests using Vitest but when using the fixture from @open-wc, it doesn't. The problem I have a project using Lit Element with a lot of unit tests and I'm using Playwright as ...
0 votes
0 answers
130 views

I have the following simplified pinia store: export const useMyStore = defineStore('myStore', () => { const doSomething = (param) => { console.log('doSomething called with: ', param) ...
0 votes
0 answers
35 views

First of all I have to say that the nuxt documentation for unit testing a nuxt module is sooo bad, me and all my colleagues are not able to create even a tiny unit test. So what I am trying to do is ...
0 votes
0 answers
179 views

Is there a special configuration I need for vi.mock('../src/some/file', ...) to work in browser mode? Is it supported for a specific provider or browser? I think it's implemented, but I can't get it ...
1 vote
0 answers
291 views

The page that I'm trying to write unit tests about is as follows: <script setup lang="ts"> import { Content, fetchOneEntry, isPreviewing } from '@builder.io/sdk-vue' import { useRoute }...
0 votes
0 answers
171 views

I'm building a browser library for consumption by our clients where they can include it in their site and utilize it to access our services, etc. I am trying to set up unit testing for the library. ...
0 votes
0 answers
47 views

I am writing a React component that wraps an external web-component. Since this is external I want to wrap it in an error boundary. Everything works in production, but I encounter some problems when ...
1 vote
0 answers
86 views

I try the fireEvent to click outside or emitted 'update:modelValue' but the v-dailog element still visible. So how can I correctly simulate the closing behavior of v-dialog ? Thanks in advance for ...
0 votes
0 answers
71 views

I'm trying to migrate a project from Jest to Vitest and I'm having issues with mocks. I can't figure out why, when mocking a third party module and using mock implementations/mock returned values, ...
0 votes
0 answers
19 views

I am getting an error "ApolloError: No more mocked responses for the query: mutation CreatePost($text: String!, $title: String!, $imageUrl: URL, $videoUrl: URL, $organizationId: ID!, $file: ...
0 votes
0 answers
47 views

I have a problem with Vitest (in TS). Namely the mocking of hash functions is not working properly. I have two methods that handle hashing and compare: hash.ts: import * as bcrypt from 'bcrypt'; ...
0 votes
0 answers
247 views

I want to write tests for the following function using Vitest. import { randomUUID } from "node:crypto"; export const getRandomUUID = (): string => { return randomUUID(); } I wrote ...

1
2 3 4 5 6