Ariska Hidayattech.finlup.id·Dec 13, 2024Penggunaan setup.ts di VitestDalam Vitest, file setup.ts digunakan untuk menjalankan kode setup atau inisialisasi sebelum semua tes dijalankan. File ini sangat berguna untuk mengonfigurasi hal-hal yang bersifat global, seperti: Pengaturan Library Pihak Ketiga: Contohnya: Mengi...vitest
Peter Babinecpeterbabinec.hashnode.dev·Nov 16, 2024Writing Foolproof React TestsIntro Throughout my career, I have always felt fortunate when I had the chance to work with people who truly enjoy writing good unit tests. I could be certain of one thing: they cared about high code quality - which in turn, let me always rely on the...59 readssoftware development
Ayush Kumarnamaste-react.hashnode.dev·Oct 22, 2024Vitest : (A Vite-native testing framework)1. Vitest Scripts in package.json "scripts": { // This script runs Vitest to execute the test suite "test": "vitest", // This script runs Vitest with an additional flag --coverage // The --coverage flag generates a test coverage repo...vitest
Pawan Gangwaniblogs.pgangwani.co.in·Aug 31, 2024Creating Interactive Tests in Storybook and Reusing Them in Jest/VitestIntroduction Interactive tests in Storybook allow you to simulate user interactions and verify component behavior. By reusing these tests in Jest or Vitest, you can ensure consistency across your testing environments. This guide will walk you through...54 readsStorybook
Bruno Sabotbrunosabot.hashnode.dev·Jun 30, 2024Mastering Time: Using Fake Timers with VitestPhoto by Aron Visuals on Unsplash In the world of testing, controlling time can be a real challenge. Real-world timers, like setTimeout() and setInterval(), can be cumbersome when writing unit tests: without the right technique, you will introduce ex...JavaScript
Carlos Eduardo Burkophantodev.hashnode.dev·May 30, 2024Comparing Vitest and Jest: Which Testing Framework is Better?If you develop in JavaScript, you have several options to test your code. Two of the most popular are Jest and Vitest.😁 Which is better, Jest or Vitest? It depends on how you manage your code modules, your development environment, and how much you v...112 readsJest
Arjun Dangitechbuild.hashnode.dev·May 4, 2024Write Unit Test For React Application. (vitest, Testing-library)Here we will use the following packages for writing unit tests. Our application will be a react application that uses Tanstak-react-query for API calls. Vitest Testing-library Happy-dom Mock Server Worker (MSW) Testing API Calls In modern web a...40 readsunit testing
Ákos Kőművesakoskm.com·Apr 19, 2024How to test React apps with Vitest and ViteA few weeks ago, I began creating small applications for my upcoming course on Testing React applications. I aimed to make the setup simple and easy for students to follow. I started with the Babel/Jest setup, which I've used for years, but people ha...576 readsTesting ReactReact
Sean Coughlinblog.seancoughlin.me·Apr 9, 2024FeaturedAccelerating Frontend Development with Bun and ViteRolling with Bun In the vibrant world of web development, the quest for more efficient tools and workflows is unending. Enter Bun, a modern JavaScript runtime that’s piquing the interest of developers for its all-in-one approach. But what exactly mak...39 likes·1.5K readsWeb DevelopmentBun
DJ Scruggsdjscruggs.hashnode.dev·Mar 27, 2024CKEditor custom builds in ReactRecently I've been working on a project that uses a CKEditor custom build. While CKEditor is an impressive piece of software, React is extremely picky about how you import the library. I did a lot of trial and error to get it working on my project, s...CKEditor