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-code

Installs 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


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
1freestylefly avatarpaddleocr-doc-parsingfreestylefly/canghe-skillsAdvanced document parsing with PaddleOCR. Returns complete document structure including text, tables, formulas, charts, and layout information. The AI agent ext373skills.sh installs
2levnikolaevich avatarln-740-quality-setuplevnikolaevich/claude-code-skillsSets up linters, pre-commit hooks, and test infrastructure. Use when adding code quality tooling to a project.372skills.sh installs
3bartundmett avatarshopware6-best-practicesbartundmett/skillsComprehensive Shopware 6.6+ development best practices for agency developers. Covers backend PHP, storefront Twig/JS, administration Vue.js, app system, integra369skills.sh installs
4ancoleman avatarimplementing-drag-dropancoleman/ai-design-componentsImplements drag-and-drop and sortable interfaces with React/TypeScript including kanban boards, sortable lists, file uploads, and reorderable grids. Use when bu368skills.sh installs
5cloudwego avatareino-agentcloudwego/eino-extEino ADK agent construction, middleware, and runner. Use when a user needs to build an AI Agent, configure ChatModelAgent with ReAct pattern, use middleware (fi366skills.sh installs
6zzci avatarpma-gozzci/skillsGo implementation guide for PMA-managed service and CLI projects. Covers project layout (cmd/internal), strict linting with golangci-lint v2, database access (s366skills.sh installs