unit-testing
Skill by podman-desktop
Guides writing and maintaining Vitest unit tests for the bootc extension's backend, frontend, and shared packages. It covers mocking @podman-desktop/api, RPC clients, Svelte stores, and Node.js modules.
Install unit-testing
Built from the published package, never by AI.
git clone --depth 1 https://github.com/podman-desktop/extension-bootc /tmp/extension-bootc && mkdir -p ~/.claude/skills && cp -r /tmp/extension-bootc/.agents/skills/unit-testing ~/.claude/skills/unit-testingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/podman-desktop/extension-bootc /tmp/extension-bootc && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/extension-bootc/.agents/skills/unit-testing ~/.gemini/antigravity-cli/skills/unit-testingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant guidance for writing and maintaining Vitest unit tests in the bootc extension. It covers the backend, frontend, and shared packages. The backend and shared packages use the Node.js environment, and the frontend uses JSDOM with @testing-library/svelte for components.
The skill includes patterns for mocking @podman-desktop/api, RPC clients, Svelte stores, and Node.js modules such as node:fs and node:child_process. It also lists commands for running all tests, a single file, or watch mode, plus coverage reports and naming rules for *.spec.ts files. It is intended for developers working on the bootc extension's tests.
Written from the project's SKILL.md and checked against it.
What it can do
- Backend test patternsShows how to mock @podman-desktop/api and test backend functions in Vitest.
- Node.js module mocksGives examples for mocking node:fs and node:child_process in tests.
- Frontend component testingExplains rendering Svelte components with @testing-library/svelte and mocking RPC clients.
- Svelte store mocksShows how to mock Svelte stores with readable values in test files.
- Path alias guidanceExplains how /@/ and /@shared/ aliases resolve in frontend test mocks.
- Test commandsLists commands to run all tests, one file, or watch mode per package.
- Coverage reportsDescribes lcov and text coverage output for the backend and frontend packages.
- Common issue fixesCovers errors such as missing @podman-desktop/api module and non-Svelte component errors.
What you need
- pnpm
- Vitest 4
Try asking
- Write a Vitest spec for build-disk-image.ts in the backend package.
- Why is this Vitest test failing in the frontend package?
- Mock the bootc RPC client in a Svelte component test.
Good to know
- Frontend tests retry failed tests 2x, while backend tests do not retry.
- Commands and paths are specific to the bootc extension repository layout.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/unit-testing/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB
Alternatives to unit-testing
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
unit-testing: common questions
Which test environment does each package use?
The backend and shared packages use the Node.js environment. The frontend uses JSDOM with @testing-library/svelte for components.
Do backend tests retry on failure?
No. The source says frontend tests retry failed tests 2x, and backend tests do not retry.
How is @podman-desktop/api mocked in the backend?
The backend vite.config.js aliases @podman-desktop/api to a mock file, and each test mocks only the namespaces it uses.
How do I install unit-testing?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is unit-testing free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is unit-testing safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to unit-testing?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
