Socket
Book a DemoInstallSign in
Socket

create-vitest

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
13
-31.58%
Maintainers
1
Weekly downloads
 
Created
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

vitest

FAQs

Package last updated on 08 Sep 2023

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.