testing
Guide for writing tests in Agent Lens. Use when creating unit tests, integration tests, or setting up test infrastructure.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guide for writing tests in Agent Lens. Use when creating unit tests, integration tests, or setting up test infrastructure.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | testing |
| description | Guide for writing tests in Agent Lens. Use when creating unit tests, integration tests, or setting up test infrastructure. |
vitest.config.ts (globals enabled, includes src/**/*.test.ts and webview/**/*.test.ts)npm testnpx vitest run src/parsers/agentParser.test.tsnpm run test:watchsrc/parsers/foo.ts → src/parsers/foo.test.tsdescribe / it blocksexpect assertionsdescribe, it, expect)| Layer | What to test | Example file |
|---|---|---|
| Parsers | Pure function input/output, edge cases, malformed input | agentParser.test.ts |
| Analyzers | Graph construction, metrics aggregation, edge cases | graphBuilder.test.ts |
| Detectors | Detection logic for agents, skills, tools, MCP servers | detectors.test.ts |
| Layout | D3-DAG layout algorithm, cycle handling | webview/layout.test.ts |
fs and vscode.workspace at boundariesdescribe("parserName", () => {
it("should parse valid input", () => {
const result = parseAgent(validMarkdown);
expect(result.name).toBe("expected");
});
it("should handle missing frontmatter", () => {
const result = parseAgent("no frontmatter here");
expect(result.name).toBe("");
});
});
Investigate and fix a bug using the project's TDD workflow. Use when given a bug report or GitHub issue to fix.
Background knowledge about the Agent Lens VS Code extension architecture. Preloaded by agents for project context.
Guide for developing the Agent Lens VS Code extension. Use when creating or modifying extension code, webviews, tree views, or commands.
Guide for writing tests. Use this when creating unit tests, integration tests, or setting up test infrastructure.
Guide for developing VS Code extensions. Use this when creating or modifying extension code, webviews, tree views, or commands.