Socket
Socket
Sign inDemoInstall

create-vitest

Package Overview
Dependencies
142
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    create-vitest

A npx command to create and scaffold vite tests with best practices


Version published
Weekly downloads
17
decreased by-10.53%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 08 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc