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:

Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 ⋅ 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 ⋅ 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 ⋅ 5 min read
Deno logo over an orange background

How to migrate your Node.js app to Deno 2.0

Deno is a popular JavaScript runtime, and it recently launched version 2.0 with several new features, bug fixes, and improvements […]

Yashodhan Joshi
Dec 17, 2024 ⋅ 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