create-vitest

1.1.0 • Public • Published

Create Vitest

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!


Features

  • 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

Usage

Regular usage

$ npm create vitest

Or

$ npx create-vitest

Specifying a file

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 ❤️

Package Sidebar

Install

npm i create-vitest

Weekly Downloads

15

Version

1.1.0

License

MIT

Unpacked Size

62.8 kB

Total Files

4

Last publish

Collaborators

  • dolanmiu