A command line utility tool to generate a pre-configured vitest test (spec) file for a TypeScript file with best practices. Scaffold the test and mock all imports!
- A consistent approach to testing which works for any scenario
- Mocks all dependencies (imports) of the file
- Optionally override the mock with test specific mock
- Best practice for test teardown
- Best practice for test setup and scaffold
- Easy to use beautiful CLI tool to guide you alone the way
$ npm create vitest
Or
$ npx create-vitest
This is a short-cut, but otherwise it's the same as above. If the file name is not specified, it will be prompted.
$ npm create vitest <file-name>
Or
$ npx create-vitest <file-name>
Made with ❤️