agents/vitest-dom/SKILL.md
Use vitest + jsdom for fast, lightweight unit tests for front-end apps
npx skillsauth add sanand0/scripts vitest-domInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
vitest.config.*; default ESM import works, launch via "test": "npx -y vitest run" in package.json. Add jsdom as a devDependency. Add npm test to prepublishOnlyconsole.* output.settings.fetch.virtualServers = [{url:"https://test/", directory: <root>}]. Use page.goto("https://test/...") to load files without a dev-server.window, document, etc.vi.useFakeTimers() in beforeAll, vi.useRealTimers() in afterAll.window.setTimeout = setTimeout so app code sees the mocked clock.vi.advanceTimersByTime(ms) instead of await sleep.vi.fn() - e.g. window.fetch = vi.fn(() => Promise.resolve({ok:true,...})) avoids network and lets you assert payloads.vi.spyOn(console, "error"), clipboard reads, etc.; always mockRestore() afterwards to prevent bleed-through.{ timeout: 10_000 }, for long-running tests.testing
If the task had failures or was inefficient or complex, ALWAYS run this post-mortem.
tools
If any tool call fails, log it IMMEDIATELY with this skill
data-ai
Brainstorm creative, novel, non-obvious ideas or options for an open-ended problem and narrow them to a recommendation. Not for writing prose, research, explanation, summaries, or questions with one right answer.
documentation
To write in Anand's style in blog posts, talk summaries, interview questions, emails, ...