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:

how to use the ternary operator in javascript

How to use the ternary operator in JavaScript

Add to your JavaScript knowledge of shortcuts by mastering the ternary operator, so you can write cleaner code that your fellow developers will love.

Chizaram Ken
Feb 21, 2025 ⋅ 7 min read
Using tsup To Bundle Your TypeScript Package

Using tsup to bundle your TypeScript package

Learn how to efficiently bundle your TypeScript package with tsup. This guide covers setup, custom output extensions, and best practices for optimized, production-ready builds.

Muhammad Ali
Feb 20, 2025 ⋅ 7 min read
how to use react higher order components

How to use React higher-order components

Learn the fundamentals of React’s high-order components and play with some code samples to help you understand how it works.

Hussain Arif
Feb 20, 2025 ⋅ 10 min read
dependency inversion principle

Understanding the dependency inversion principle (DIP)

Learn about the dependency inversion principle (DIP), its importance, and how to implement it across multiple programming languages.

Samuel Olusola
Feb 20, 2025 ⋅ 8 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