Agent Skills › gridaco/grida › fixtures

fixtures

GitHub

指导仓库内测试固定数据的创建、组织与引用规范,确保测试可复现且自包含。涵盖最佳实践、目录结构说明及引擎快照管理规则。

.agents/skills/fixtures/SKILL.md gridaco/grida

Trigger Scenarios

创建新的测试固定数据文件 编写依赖固定数据的测试用例 决定哪些文件应提交至版本控制

Install

npx skills add gridaco/grida --skill fixtures -g -y
More Options

Non-standard path

npx skills add https://github.com/gridaco/grida/tree/main/.agents/skills/fixtures -g -y

Use without installing

npx skills use gridaco/grida@fixtures

指定 Agent (Claude Code)

npx skills add gridaco/grida --skill fixtures -a claude-code -g -y

安装 repo 全部 skill

npx skills add gridaco/grida --all -g -y

预览 repo 内 skill

npx skills add gridaco/grida --list

SKILL.md

Frontmatter
{
    "name": "fixtures",
    "description": "Guides authoring, organizing, and referencing test fixtures in this repo. Use when creating new fixtures, writing tests that depend on fixtures, or deciding what should be checked into git. Engine fixtures (rendering corpora) live in the engine repo."
}

Fixtures

What fixtures are

Fixtures are static input files — .fig archives, clipboard captures, markdown samples, .grida documents — used as deterministic inputs to parsing and I/O tests. They exist so that tests are reproducible, self-contained, and don't depend on external services or generated data.

Why we keep them

  • Regression detection — parse the same input, compare the output.
  • Spec coverage — each fixture maps to a specific feature or edge case being tested (one concept per file).
  • Onboarding — new contributors can see exactly what the importers handle by browsing fixtures.

Best practices

  • One concept per file. Don't combine unrelated properties.
  • Self-contained. No external resources, network fetches, or scripts.
  • Minimal. Only enough structure to isolate the behavior under test.
  • Descriptive naming. <domain>-<property>[-<descriptor>].<ext> — the filename alone should tell you what's being tested.
  • Don't duplicate. Before adding a fixture, check if an existing one already covers the behavior. Extend or split rather than duplicate.

The tree — who owns what

fixtures/
├── test-fig/         # Figma clipboard / .fig fixtures (LFS: *.fig, *.deck)
├── test-figma/       # Figma archive / REST fixtures
├── test-canvas/      # .canvas (dotcanvas) fixtures
├── test-markdown/    # Markdown fixtures
├── fonts/            # ← FROZEN SNAPSHOT (engine-owned)
├── images/           # ← FROZEN SNAPSHOT (engine-owned)
├── test-grida/       # ← FROZEN SNAPSHOT (engine-owned)
└── text-editor/      # ← FROZEN SNAPSHOT (engine-owned)

Frozen snapshots

The engine repo owns the canonical, evolving copies of fonts/, images/, test-grida/ and text-editor/ (its crates consume them at compile/test time, with full git history carried over). The copies here exist only so staying tests keep passing at their original paths — consumers: @grida/fonts, @grida/refig, @grida/io, the editor reducer round-trip, @grida/text-editor. Do not edit them here; re-snapshot deliberately from the engine repo if the canon evolves. See fixtures/README.md.

New engine fixtures (rendering, SVG/HTML corpora, engine formats) go to the engine repo: https://github.com/gridaco/nothing/tree/main/fixtures. New fixtures for staying product code go in a grida-owned directory here.

Local-only fixtures

Large, third-party, or license-restricted corpora are never committed — the engine repo keeps its own gitignored fixtures/local/ convention. Never reference a gitignored local path in committed code, tests, or documentation — it does not exist in CI or on other developers' machines. If a doc must mention one (e.g. the refig corpus workflow in the io-figma skill), clearly mark it local-only and note the download/build step.

Version History

  • 29f3afa Current 2026-08-20 15:55

Same Skill Collection

.agents/skills/ai-models/SKILL.md
.agents/skills/code-react/SKILL.md
.agents/skills/code-ts/SKILL.md
.agents/skills/database/SKILL.md
.agents/skills/docs-canvas/SKILL.md
.agents/skills/docs/SKILL.md
.agents/skills/editor-perf/SKILL.md
.agents/skills/ee-billing/SKILL.md
.agents/skills/ee/SKILL.md
.agents/skills/etiology/SKILL.md
.agents/skills/io-figma/SKILL.md
.agents/skills/io-grida/SKILL.md
.agents/skills/links/SKILL.md
.agents/skills/naming/SKILL.md
.agents/skills/opt-library/SKILL.md
.agents/skills/oss-standards/SKILL.md
skills/dotcanvas/SKILL.md
skills/slides/SKILL.md
skills/svg/SKILL.md
.agents/skills/agent-system/SKILL.md
.agents/skills/desktop/SKILL.md
.agents/skills/docs-svg-kit/SKILL.md
.agents/skills/docs-wg/SKILL.md
.agents/skills/gg/SKILL.md
.agents/skills/grounding/SKILL.md
.agents/skills/pedantic/SKILL.md
.agents/skills/sdk-design/SKILL.md
.agents/skills/sdk-seam/SKILL.md
.agents/skills/security/SKILL.md
.agents/skills/seo/SKILL.md
.agents/skills/vision/SKILL.md

Metadata

Files
0
Version
b26ede1
Hash
9e734d0b
Indexed
2026-08-20 15:55

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 09:34
浙ICP备14020137号-1