Skip to content

tyler36/ddev-vitest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

add-on registry tests last commit release

ddev-vitest

Overview?

ddev-vitest is a helper add-on for DDEV that improves the developer experience for projects using Vitest.

Vitest describes itself as a "next generation testing framework", a fast "Vite-native" testing framework.

Installation

ddev add-on get tyler36/ddev-vitest
ddev restart

After installation, make sure to commit the .ddev directory to version control.

Usage

ddev vitest is a helper command to run Vitest from the host. It accepts all flags accepted by vitest. For example, to see the currently installed version of Vitest:

ddev vitest --version

Commands

Command Description
ddev vitest Run Vitest from host
ddev vitest-ui -s Start and launch Vitest UI server in default browser
ddev vitest-ui Launch Vitest UI server in default browser

Note

If you attempt to start Vitest UI via ddev vitest --ui, this addon hijacks the command and re-writes it to be compatible with DDEV.

Auto-start Vitest UI

Use DDEV's post-start hook to automatically start Vitest UI.

The following snippet starts the UI server and launches the test page.

hooks:
  post-start:
    - exec-host: ddev vitest-ui

Vite

Vitest is a great companion to Vite. For more information about using Vite with DDEV,

Credits

Contributed and maintained by tyler36

About

A helper add-on for projects using Vitest

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published