1.2.2 • Published 8 months ago

@repobuddy/vitest v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@repobuddy/vitest

NPM version NPM downloads

@repobuddy/vitest provides tools and utilities to take care of Vitest stuffs, so you don't have to.

Install

# npm
npm install -D @repobuddy/vitest

# yarn
yarn add -D @repobuddy/vitest

# pnpm
pnpm install -D @repobuddy/vitest

#rush
rush add -p --dev @repobuddy/vitest

Features

  • Provides test presets for Node.js and browser environments
    • nodeTestPreset: Configures Vitest for Node.js testing
    • browserTestPreset: Configures Vitest for browser testing using Playwright
  • Includes common test configurations and defaults
  • Sets timezone to GMT and automatically restores mocks after tests
  • Provides better config defaults such as test file patterns and coverage configurations
  • Disables screenshot on failure in browser tests to avoid Storybook loading issues

Usage

// vitest.config.node.ts
import { defineConfig } from 'vitest/config'
import { nodeTestPreset } from '@repobuddy/vitest'

export default defineConfig({
  plugins: [nodeTestPreset({ includeGeneralTests: true })],
})


// vitest.config.browser.ts
import { defineConfig } from 'vitest/config'
import { browserTestPreset } from '@repobuddy/vitest'

export default defineConfig({
  plugins: [browserTestPreset()],
})
1.2.2

8 months ago

1.2.1

8 months ago

1.2.0

8 months ago

1.1.0

8 months ago

1.0.0

8 months ago