Latest

From olorehq/olore · View interactive version

Latest is an AI agent skill from the GitHub repository olorehq/olore. Local bunit documentation reference (latest). bUnit Blazor testing documentation. Use for Blazor component testing, rendering, event handling, JSInterop mocking, and test assertions in .NET.

How to use this skill

Skill file

bunit Documentation

bUnit is a testing library for Blazor components. It lets you render Blazor components in unit tests, pass parameters, inject services, trigger events, and assert on rendered markup and component state. It integrates with xUnit, NUnit, and MSTest, and supports writing tests in both .cs and .razor files.

Documentation Structure

contents/
├── getting-started/    # Project setup, templates, writing first tests (3 files)
├── providing-input/    # Parameters, services, render tree, component substitution (8 files)
├── interaction/        # Triggering events, renders, async state, render modes (6 files)
├── verification/       # Markup assertions, component state, semantic comparison (5 files)
├── test-doubles/       # Built-in fakes: JSRuntime, HttpClient, auth, navigation (9 files)
├── extensions/         # Optional NuGet extensions like bunit.generators (2 files)
└── migrations/         # Migration guides across major versions (2 files)

Topic Guide

| Topic | Key Files |

|-------|-----------|

| Setting up a test project | contents/getting-started/create-test-project.md |

| Writing first Blazor component tests | contents/getting-started/writing-tests.md |

| Passing parameters and cascading values | contents/providing-input/passing-parameters-to-components.md |

| Injecting services | contents/providing-input/inject-services-into-components.md |

| Substituting / mocking child components | contents/providing-input/substituting-components.md |

| Third-party library setup | contents/providing-input/configure-3rd-party-libs.md |

| Triggering event handlers | contents/interaction/trigger-event-handlers.md |

| Awaiting async state changes | contents/interaction/awaiting-async-state.md |

| Render modes (SSR, WASM, Server) | contents/interaction/render-modes.md |

| Asserting rendered markup | contents/verification/verify-markup.md |

| Inspecting component state | contents/verification/verify-component-state.md |

| Semantic HTML comparison | contents/verification/semantic-html-comparison.md |

| Async assertions | contents/verification/async-assertion.md |

| Mocking IJSRuntime / JSInterop | contents/test-doubles/emulating-ijsruntime.md |

| Mocking HttpClient | contents/test-doubles/mocking-httpclient.md |

| Faking authentication/authorization | contents/test-doubles/auth.md |

| Faking NavigationManager | contents/test-doubles/navigation-manager.md |

| Faking PersistentComponentState | contents/test-doubles/persistentcomponentstate.md |

| Faking IWebAssemblyHostEnvironment | contents/test-doubles/fake-webassemblyhostenvironment.md |

| InputFile component testing | contents/test-doubles/input-file.md |

| Localization mocking | contents/test-doubles/mocking-localizer.md |

| Source generators for component stubs | contents/extensions/bunit-generators.md |

| Migrating from v1 to v2 | contents/migrations/1to2.md |

| Misc testing tips and patterns | contents/misc-test-tips.md |

When to use

Use this skill when the user asks about:

How to find information

  1. Use Topic Guide above to identify relevant files
  2. Read TOC.md for complete file listing by directory
  3. Read specific files from contents/{path}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.