test-writer

Generate Vitest tests from code examples in JavaScript concept documentation pages.

66.5k|9.1k|Updated Sep 4, 2018
One-click install
npx skills add https://github.com/leonardomso/33-js-concepts --skill test-writer-leonardomso
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/leonardomso/33-js-concepts/tree/main/.opencode/skill/test-writer
Command: npx skills add https://github.com/leonardomso/33-js-concepts --skill test-writer-leonardomso

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill generates comprehensive Vitest tests for all code examples found within JavaScript concept documentation pages, ensuring that every example is validated and traceable to the source.

Core Features & Use Cases

  • Automated extraction of code samples from concept pages and conversion into Vitest test suites.
  • Alignment with documentation structure, so tests map directly to sections and lines referenced in the docs.
  • Use Case: Before publishing or auditing a concept page, run this skill to produce tests that verify example outputs and edge cases.

Quick Start

Use the test-writer skill on a JavaScript concept page (or MDX source) to generate a tests file and place it under tests/ in the corresponding category.

Frequently Asked Questions about test-writer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Vitest tests from JavaScript documentation code examples?

This skill generates Vitest tests by extracting code samples from JavaScript concept documentation pages, converting them into test suites, and placing the files under the tests/ directory aligned with each concept.

What is the best way to ensure code examples in MDX concept pages are tested?

The best way to ensure MDX concept page examples are tested is using this skill to extract code samples, reference exact source lines, and generate Vitest test files that validate example outputs and edge cases.

Can I automatically map generated Vitest test files to specific sections in my concept docs?

Yes, you can map generated Vitest tests to specific doc sections because this skill aligns tests directly with the documentation structure and references exact source lines from the concept pages.

Do I need to manually configure Vitest conventions for tests generated from documentation?

No, you do not need to manually configure Vitest conventions because this skill automatically ensures all generated test files follow the repository's existing test conventions and integrates directly with Vitest.

When should I run automated test generation for JavaScript concept pages?

You should run automated test generation for JavaScript concept pages before publishing or auditing them to verify that all code sample outputs and edge cases are validated and traceable to the source.

Related Skills