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...DiscussJavaScript
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...DiscussJest
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...Discussunit testing
Ákos KőművesProakoskm.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...Discuss·233 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...Discuss·39 likes·744 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...DiscussCKEditor
Ayomide Apantakuayoapantaku.com·Mar 16, 2024Resolving "Object literal may only specify known properties, and 'test' does not exist in type 'UserConfigExport'"I was setting up tests for a Vite project using vitest and stumbled upon a very weird error while including my setup test file in the vite.config.ts: It turns out test isn't exported from UserConfigExport interface and it only allows properties defi...Discussvite
Manik Agnishmanikagnish.hashnode.dev·Mar 13, 2024Javascript testing quick start guideTesting is a crucial aspect of software development, and JavaScript is no exception. As web applications become more complex, testing ensures that our code works as expected, catches bugs early in the development process, and facilitates refactoring ...DiscussTesting
Sean Coughlinblog.seancoughlin.me·Jan 18, 2024Testing React Applications Built with Vite Using VitestIn the ever-evolving world of JavaScript development, React remains a popular choice for building user interfaces. When paired with Vite, a next-generation frontend tooling, it accelerates development with its out-of-the-box features like fast hot mo...Discuss·427 readsWeb DevelopmentWeb Development
Borislav Grigorovbrslv.hashnode.dev·Jan 11, 2024Introduction to Testing React Components with Vite, Vitest and React Testing LibraryOriginally published on my blog: https://bogr.dev/blog/react-testing-intro/ This article assumes a certain level of agreement between me and you that testing the code we write as developers, is important. And also, that the best way to ensure our cod...Discuss·1 like·130 readsReact