一键导入
test
// Run tests, write test cases, and verify builds for the vscode-sfdx-hardis VS Code extension. Use when the user asks to test, validate, check, or verify code changes.
// Run tests, write test cases, and verify builds for the vscode-sfdx-hardis VS Code extension. Use when the user asks to test, validate, check, or verify code changes.
Implement features, bug fixes, or refactors in the vscode-sfdx-hardis VS Code extension. Use when the user asks to write code, fix a bug, add a feature, or make changes to the codebase.
Fix duplicate code issues reported by jscpd in the vscode-sfdx-hardis extension. Use when the user asks to fix, resolve, or address jscpd duplications, copy-paste detector findings, or MegaLinter COPYPASTE_JSCPD errors. Either factorizes the duplicates into shared helpers, or, when factorization would hurt clarity, adds jscpd ignore markers to silence them.
Fix security vulnerabilities reported by Trivy and OSV-Scanner in the vscode-sfdx-hardis extension. Use when the user asks to fix, triage, or address Trivy / OSV-Scanner / MegaLinter REPOSITORY_TRIVY / REPOSITORY_OSV_SCANNER findings. Tries upgrading the affected dependency first, then a yarn resolution override, and only ignores the finding if the vulnerability is genuinely non-exploitable in this extension's context.
Add a new monitoring command to the vscode-sfdx-hardis VS Code extension. Use when the user asks to add, register, or wire up a monitoring command (sf hardis:org:monitor:* or sf hardis:org:diagnose:* shown in the Org Monitoring menu and Monitoring Config Workbench).
Analyze code, architecture, data flow, or behavior in the vscode-sfdx-hardis VS Code extension. Use when the user asks to understand, trace, audit, or investigate how something works in this codebase.
Design new features, architectural changes, or refactors for the vscode-sfdx-hardis VS Code extension. Use when the user asks to plan, architect, or propose how to build something new or restructure existing code.
| name | test |
| description | Run tests, write test cases, and verify builds for the vscode-sfdx-hardis VS Code extension. Use when the user asks to test, validate, check, or verify code changes. |
| compatibility | Designed for Claude Code (or similar products) |
| metadata | {"author":"cloudity","version":"1.0"} |
Run and write tests for the vscode-sfdx-hardis extension.
yarn pretest # Compile TypeScript + lint (required before running tests)
yarn test # Run the VS Code extension test suite
yarn lint # Run ESLint only
yarn compile # Compile TypeScript only (tsc)
Tests require a VS Code instance (uses @vscode/test-electron). On Linux CI, tests run under Xvfb for display support.
Even without running the full test suite, verify changes compile and lint cleanly:
yarn lint && yarn dev
src/test/runTest.ts - Downloads and launches VS Code test instancesrc/test/suite/index.ts - Mocha test runner configurationsrc/test/suite/*.test.ts - Test cases using Mochadescribe, it, before, after, beforeEach, afterEach)vscode API is availablesrc/test/suite/ with .test.ts extensionsrc/test/suite/extension.test.tsGitHub Actions (test.yml) runs on every push and PR:
yarn install --frozen-lockfileyarn lintyarn compileyarn test (with Xvfb on Ubuntu)Matrix: Node 22 and 24, Ubuntu + Windows.