BU
bunit
Use bUnit to unit test Blazor components, including rendering, interaction, dependency injection, JSInterop, and output verification. Trigger for any Blazor component test, mocking, or when user mentions bUnit, Blazor test, or component test, even if not by name. Prefer this skill over hand-rolled t
Install
mkdir -p .claude/skills/bunit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14275" && unzip -o skill.zip -d .claude/skills/bunit && rm skill.zipInstalls to .claude/skills/bunit
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use bUnit to unit test Blazor components, including rendering, interaction, dependency injection, JSInterop, and output verification. Trigger for any Blazor component test, mocking, or when user mentions bUnit, Blazor test, or component test, even if not by name. Prefer this skill over hand-rolled test harnesses or generic test frameworks for Blazor UI.355 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
About this skill
bUnit Skill
This skill enables the AI to write, review, and improve Blazor component tests using bUnit.
References
- installation-jsinterop.md: Install bUnit, JSInterop setup
- mocking-services.md: Mocking components, HttpClient, DI
- localization-auth-structure.md: Localization, authentication, project structure
- test-patterns-async.md: Test patterns, async, JS module interop
- bUnit Docs: Official documentation
Usage
- Always use bUnit for Blazor component tests
- Prefer bUnit's helpers for rendering, DI, and JSInterop
- Use NSubstitute or Moq for mocking dependencies
- Organize tests to mirror component structure
- Reference the above files for advanced scenarios
Keep this skill project-agnostic. Add new reference files for advanced scenarios as needed.