azure/run-unit-tests
Run unit tests for the Cosmos Explorer project. Use this skill when asked to run tests, check test results, or debug test failures.
npx skills add https://github.com/Azure/cosmos-explorer --skill run-unit-tests
Use the following commands to run unit tests for the Cosmos Explorer project.
Before running tests, check whether npm install needs to be run:
if [ ! -d node_modules ] || [ package.json -nt node_modules ] || [ package-lock.json -nt node_modules ]; then
npm install
fi
On Windows PowerShell:
if (-not (Test-Path node_modules) -or
(Get-Item package.json).LastWriteTime -gt (Get-Item node_modules).LastWriteTime -or
(Get-Item package-lock.json).LastWriteTime -gt (Get-Item node_modules).LastWriteTime) {
npm install
}
Always run this check before proceeding with any test command.
Run the full test suite with coverage:
npm test
This clears the coverage/ directory and runs Jest with coverage collection enabled.
Run a specific test file without coverage (faster):
npm run test:file -- path/to/file.test.ts
Run tests serially (useful for debugging flaky or interdependent tests):
npm run test:debug
Run only tests whose names match a pattern:
npx jest --coverage=false --testPathPattern="SomeComponent"
npm test for the full suite.npm run test:file -- <path>.npm run test:debug to run serially.Foo.test.ts next to Foo.ts in src/).jest-environment-jsdom.@testing-library/react for new component tests. Do not use Enzyme for new tests.npx jest --updateSnapshot.jest.config.js are correct.npm run compile to check for TypeScript issues.Take azure/run-unit-tests from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm, npx.
Without those the skill loads but fails at the first command.