Agent skill · equinor

fusion-framework-testing

Guides writing and running Vitest tests for Fusion Framework React apps with @equinor/fusion-framework-vitest-plugin-react-app — choosing a testing layer, configuring vitest.config.ts and Browser Mode, rendering with test/render/renderAppHook/renderAppComponent/testApp fixtures, and troubleshooting or migrating a suite. USE FOR: writing a new app/component/hook test, setting up vitest.config.ts for a Fusion app, choosing between app/framework/module/HTTP test layers, composing or overriding test fixtures, diagnosing a failing Fusion app test. DO NOT USE FOR: seeding module-specific mock state (auth, context, bookmarks, feature flags, HTTP) — use fusion-framework-mocking; dev-server-time API mocking/proxying (use fusion-developer-app); non-Fusion test suites; backend/service-repo tests.

What it needs

About 4k tokens when loaded.

What this skill does

Fusion Framework Testing When to use Use when writing or running a Vitest test for a Fusion Framework React app — a hook, component, route, or complete app — or when setting up/troubleshooting the test project itself. Typical triggers: "Write a test for this component / hook / route" "Set up vitest.config.ts for this app" "Why does this test hang / hit the network / fail to resolve the app?" "Should this be a hook test or a component test?" "Share seeded fixtures across a test file" "Migrate this suite off Testing Library / jsdom" Implicit triggers: A test file imports @equinor/fusion-framework-vitest-plugin-react-app (or its /test, /config sub-paths) vitest.config.ts needs Browser Mode, Playwright, or app-file resolution configured A test renders a component/hook that reads useAppModule, useFramework, or similar When not to use Seeding module-specific state (a signed-in user, current context, feature flags, HTTP responses) — use fusion-framework-mocking; this skill only covers rendering/running the test dev-server.config.ts API mocking/proxying for local ffc app dev — dev-time only, see fusion-developer-app Non-Fusion test suites, or backend/service-repo tests Required inputs Mandatory What is under test: pure function, hook, component, route, or complete app Whether the project already has vitest.config.ts configured for this package Conditional Whether the test needs a specific signed-in user, seeded context, or faked HTTP response (then hand off to fusion-framework-mocking for the seeding details) Whether several test files need the same fixture defaults Instructions Step 1 — Choose the smallest layer for the behavior under test Fusion test utilities substitute external boundaries only; Vitest still owns the runner, assertions, lifecycle hooks, spies, timers, and coverage. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills equinor/fusion-framework-testing

View the source on GitHub

Browse the @skills marketplace