
Umbraco Unit Testing
This handles unit testing for Umbraco backoffice extensions built with Lit and Web Components, using the @open-wc/testing framework. You get two approaches: full integration with Umbraco's context system for testing real component behavior, or a mock-based setup that's simpler and faster when you just need to test state logic and observables in isolation. The documentation is thorough about the import path gotchas (dist-cms versus dist/packages trips people up) and includes working examples from the tree-example extension. If you're building custom property editors or workspace components, this gives you the test infrastructure to catch rendering bugs and state management issues before they hit the backoffice.
- skills.sh installs
- 374
- GitHub stars
- 27
- last updated
- Aug 21, 2026
Install
$ npx -y skills add umbraco/umbraco-cms-backoffice-skills --skill umbraco-unit-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Umbraco Unit Testing
What is it?
Unit testing for Umbraco backoffice extensions using @open-wc/testing - a testing framework designed for Web Components and Lit elements. This is the fastest and most isolated testing approach.
When to Use
- Testing context logic and state management
- Testing Lit element rendering and shadow DOM
- Testing observable subscriptions and state changes
- Testing controllers and utility functions
- Fast feedback during development
Related Skills
- umbraco-testing - Master skill for testing overview
- umbraco-msw-testing - Add API mocking to unit tests
Documentation
- @open-wc/testing: https://open-wc.org/docs/testing/testing-package/
- Web Test Runner: https://modern-web.dev/docs/test-runner/overview/
Setup
Dependencies
Add to package.json:
{
"devDependencies": {
"@open-wc/testing": "^4.0.0",
"@web/dev-server-esbuild": "^1.0.0",
"@web/dev-server-import-maps": "^0.2.0",
"@web/test-runner": "^0.18.0",
"@web/test-runner-playwright": "^0.11.0"
},
"scripts": {
"test": "web-test-runner",
Sponsors
Details
- Repository
- github.com/umbraco/umbraco-cms-backoffice-skills
- Categories
- Frontend Development, Testing & QA, .NET & C#
- First seen
- Jun 3, 2026
More from umbraco/umbraco-cms-backoffice-skills
All 76- Umbraco Test Builders370
- Umbraco Testing368
- Umbraco Backoffice447
- Umbraco Controllers418
- Umbraco Dashboard418
- Umbraco Extension Template413
- Umbraco Quickstart406
- Umbraco Openapi Client405
- Umbraco Property Editor Ui405
- Umbraco Extension Registry403
- Umbraco Notifications403
- Umbraco Add Extension Reference402
- Umbraco Context Api402
- Umbraco Routing401
- Umbraco Entity Create Option Action400
- Umbraco Menu Items400
- Umbraco Mfa Login Provider400
- Umbraco Repository Pattern400
- Umbraco Auth Provider399
- Umbraco Dynamic Root399
- Umbraco Collection View398
- Umbraco Entity Bulk Actions398
- Umbraco Localization398
- Umbraco Modals398