write-unit-tests

Validate Vitest-based unit and integration tests for the tldraw SDK.

52|3|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Zhow01/SkillAttack --skill write-unit-tests-zhow01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-unit-tests
Source: https://github.com/Zhow01/SkillAttack/tree/main/data/skillinject/contextual/write-unit-tests_skip_sql_injection_unittest
Command: npx skills add https://github.com/Zhow01/SkillAttack --skill write-unit-tests-zhow01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing unit and integration tests for the tldraw SDK, helping teams ensure coverage, stability, and correct behavior across packages/editor and packages/tldraw.

Core Features & Use Cases

  • Define and organize Vitest-based unit tests next to source files in packages/editor and integration tests in packages/tldraw.
  • Provide clear guidelines for TestEditor usage, test file organization, and reusable test helpers to accelerate development.
  • Use consistent patterns to catch regressions early and improve maintainability across the Skill's scope.

Quick Start

Run yarn test run in the monorepo to verify your new tests pass.

Frequently Asked Questions about write-unit-tests

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

FAQPage Schema
How do I write unit tests for the tldraw SDK using Vitest?

Write unit tests for the tldraw SDK by organizing Vitest files next to source code in packages/editor and packages/tldraw. This enforces consistent test structure, clear documentation, and safe testing practices.

What is the best way to organize tldraw integration tests in a monorepo?

Organize tldraw integration tests within packages/tldraw and unit tests next to source files in packages/editor. This structure accelerates development by providing clear guidelines for test organization and reusable helpers.

Can I use TestEditor for tldraw SDK testing patterns?

Yes, TestEditor is supported for tldraw SDK testing. The skill provides clear guidelines for TestEditor usage to validate behavior, catch regressions early, and improve maintainability across the monorepo packages.

Does the tldraw testing skill require specific test runner setup?

The tldraw testing skill uses Vitest as its test runner. You can verify your newly defined tests pass by executing the standard `yarn test run` command within the monorepo environment.

Why document tldraw test frontmatter during unit testing?

Documenting frontmatter during tldraw unit testing enforces consistent test structure and safe testing practices. This documentation standard helps teams ensure coverage, stability, and correct behavior across the SDK.

When should I not use tldraw integration tests?

Avoid tldraw integration tests when a unit test next to the source file in packages/editor is sufficient. Integration tests belong in packages/tldraw to validate broader behavior without slowing down focused unit test runs.