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 직업 분류 기준
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.
| 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("");
});
});