2022-02-18
2010
#js libraries
Ben Holmes
93166
Feb 18, 2022 ⋅ 7 min read

Testing Vite with minimal config using Vitest

Ben Holmes I'm a web dev, UX freak, and restless tinkerer. Let me teach you the art of building websites!

Recent posts:

Server-Side Rendering With React Router V7

Server-side rendering with React Router v7

The recent merge of Remix and React Router in React Router v7 provides a full-stack framework for building modern SSR and SSG applications.

Amazing Enyichi Agu
Jan 13, 2025 ⋅ 20 min read
debugging javascript web apps

How to master JavaScript debugging for web apps

With the right tools and strategies, JavaScript debugging can become much easier. Explore eight strategies for effective JavaScript debugging, including source maps and other techniques using Chrome DevTools.

Ivy Walobwa
Jan 9, 2025 ⋅ 8 min read
A Deep Dive Into Angular’s FormArray Container

A deep dive into Angular’s FormArray container

This Angular guide demonstrates how to create a pseudo-spreadsheet application with reactive forms using the `FormArray` container.

Kayode Adeniyi
Jan 8, 2025 ⋅ 3 min read
Handling React Loading States With React Loading Skeleton

Handling React loading states with React Loading Skeleton

Implement a loading state, or loading skeleton, in React with and without external dependencies like the React Loading Skeleton package.

Ibadehin Mojeed
Jan 7, 2025 ⋅ 7 min read
View all posts

3 Replies to "Testing Vite with minimal config using Vitest"

  1. Note: Vitest is still not recommended for production use as of February 2022. Check Vitest’s homepage for up-to-date suggestions before using it.

    I can’t find this content. please link
    Can I use it in production now?

  2. It seems like vitest have not only inherited jest’s API syntax but also the issue of not being able to mock CommonJS functions declared within the same module (https://github.com/vitest-dev/vitest/discussions/3667).
    While with jest there is a workaround to use babel-plugin-rewire without altering the testing code (https://github.com/jestjs/jest/issues/936#issuecomment-545080082), could not get it to work with vitest so far.
    And this issue is very critical for my tests.

Leave a Reply