Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

vitest-fixture

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitest-fixture

Reusable fixtures for your Vitest tests

latest
Source
npmnpm
Version
0.5.2
Version published
Weekly downloads
15
1400%
Maintainers
1
Weekly downloads
 
Created
Source

vitest-fixture

npm npm

Reusable fixtures for your Vitest tests

Getting started

npm install --save-dev vitest-fixture vitest

Create vitest.config.js:

import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    deps: {
      inline: ["vitest-fixture"],
    },
  },
});

Documentation

The concept of test fixtures provides a way to build reusable and composable setup and teardown code for your tests, and thereby helps you remove much of otherwise duplicated before / after boilerplate code.

Develop

npm install
npm test

Publish

npm version minor
npm publish
git push

Credits

Thanks to the Playwright team for the inspiration for the fixture API.

Keywords

test

FAQs

Package last updated on 03 Jul 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