Debug your Vitest tests. Effortlessly.
vitest-preview is a tool designed to help developers visualize UI when writing tests. It allows for viewing the actual UI output in a browser while writing tests, eliminating the need to decipher HTML code. Built on Vite, vitest-preview is fast and user-friendly, making test creation more efficient and straightforward.
debug()
is executed.Configuration:
Add script vitest-preview:
Update .gitignore:
Usage:
debug()
in your tests to see the UI.debug()
. UI will be visible at http://localhost:5006.vitest-preview is a valuable tool for developers creating tests, offering a quick and visual way to view UI output while writing tests. With features like real-time visualization, CSS support, and image viewing, it enhances the test-writing process. Its easy installation and usage make it a convenient choice for those looking to streamline their testing workflow.