@rrlab/vitest-plugin
v0.2.1
Published
vitest plugin for @rrlab/cli — provides the test capability as a passthrough to vitest.
Readme
vitest-plugin
@rrlab/vitest-plugin is a run-run plugin for Vitest. It gives rr the test capability, a thin passthrough to vitest.
Install
rr plugins add vitestrr plugins add installs @rrlab/vitest-plugin and adds vitest as a dev dependency. It writes no config file.
It needs @rrlab/cli and Vitest 3 or later.
What it provides
| Capability | Commands |
| --- | --- |
| test | rr test, rr test doctor |
Usage
rr test forwards every flag and argument straight to vitest, so anything you'd type after vitest works unchanged:
rr test # run the suite
rr test run --coverage # forwarded verbatim
rr test --project unit # forwarded verbatim
rr test --help # vitest's own help
rr test doctor # health check (reserved by rr, not forwarded)Env files
By default rr test loads an env file before running, picking the first that exists:
.env.test.env
Override it with --env, which must come before the forwarded args:
rr test --env=.env.ci runIt's
--env, not--env-file: Node's early--env-filescanner would grab that exact token off therrprocess before the CLI could read it.
An explicit --env file that doesn't exist is an error, to catch typos. The defaults above are loaded only when present.
Removal
rr plugins remove vitestIt removes vitest from package.json, and drops vitest() from run-run.config.{ts,mts}.
License
MIT.
