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("");
});
});