Vitest Config
@theholocron/vitest-config provides Vitest configuration presets that cover the common testing environments used across theholocron projects.
Install
Section titled “Install”pnpm add -D @theholocron/vitest-config vitestPresets
Section titled “Presets”For Node.js packages. Uses the node environment and emits coverage with v8.
import { node } from "@theholocron/vitest-config/presets/node";
export default node();For React component libraries. Uses jsdom environment and adds React Testing Library globals.
import { react } from "@theholocron/vitest-config/presets/react";
export default react();storybook
Section titled “storybook”For Storybook interaction tests.
import { storybook } from "@theholocron/vitest-config/presets/storybook";
export default storybook();Bundles
Section titled “Bundles”library
Section titled “library”Pre-composed config for npm packages: node preset + coverage thresholds at 80%.
import { library } from "@theholocron/vitest-config/bundles/library";
export default library();