CtrlK
BlogDocsLog inGet started
Tessl Logo

vitest

Use when writing unit/integration tests for Vite projects - configure vitest.config.ts, write test suites with describe/it, create mock implementations with vi.fn and vi.mock, set up code coverage thresholds, and run tests in parallel

Install with Tessl CLI

npx tessl i github:onmax/nuxt-skills --skill vitest
What are skills?

100

Does it follow best practices?

Validation for skill structure

SKILL.md
Review
Evals

Evaluation results

90%

24%

Vitest Setup for a Vite + TypeScript Project

Vitest config and coverage setup

Criteria
Without context
With context

mergeConfig usage

100%

100%

Correct import source

100%

100%

globals enabled

0%

100%

Node environment

100%

100%

fileParallelism enabled

0%

100%

Coverage provider

100%

100%

Coverage reporters

100%

100%

Coverage include filter

0%

100%

Coverage thresholds

100%

100%

Pool configured

100%

100%

Coverage include sources

0%

0%

Without context: $0.3250 · 1m 16s · 16 turns · 249 in / 4,323 out tokens

With context: $0.7275 · 2m 6s · 31 turns · 31 in / 7,233 out tokens

68%

-3%

Testing a Weather API Client with Mocked Dependencies

Module mocking patterns

Criteria
Without context
With context

vi.mock hoisted

100%

100%

vi.hoisted usage

0%

0%

Partial mock with importOriginal

0%

0%

Spy-mode mock

30%

0%

vi.doMock usage

100%

100%

vi.stubEnv usage

100%

100%

vi.mocked TypeScript helper

100%

100%

Mock return values

100%

100%

toHaveBeenCalledWith assertions

100%

100%

vi.unstubAllEnvs cleanup

100%

100%

Without context: $0.4450 · 1m 46s · 18 turns · 18 in / 6,463 out tokens

With context: $1.1553 · 4m 30s · 33 turns · 1,887 in / 16,488 out tokens

76%

56%

Comprehensive Test Suite for an In-Memory Task Queue

Advanced test patterns and fixtures

Criteria
Without context
With context

test.for usage

0%

0%

No test.each

0%

0%

test.concurrent with context expect

0%

83%

test.extend fixture

0%

100%

Fixture teardown

0%

100%

onTestFinished usage

100%

100%

expect.soft usage

100%

100%

expect.poll usage

0%

100%

Fixture dependency injection

0%

100%

Without context: $0.8411 · 3m 59s · 22 turns · 21 in / 16,569 out tokens

With context: $0.4887 · 1m 38s · 23 turns · 19 in / 5,491 out tokens

Evaluated
Agent
Claude Code

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.