CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-storybook--addon-backgrounds

Deprecated Storybook addon that throws migration errors directing users to the new package structure in Storybook 9.0

86

1.08x
Overview
Eval results
Files

task.mdevals/scenario-3/

Story Component Validator

A test suite that reuses existing Storybook stories in unit tests to validate component behavior outside of the Storybook environment.

Capabilities

Render individual stories in tests

  • A test imports a single story from a Button stories file and renders it to verify the button displays "Click me" @test
  • A test imports the Primary story variant and verifies it has the class "btn-primary" @test

Render all stories from a file

  • A test imports all stories from the Button stories file and iterates through them, rendering each one to verify they all mount without errors @test

Apply global story configuration

  • A test sets up global story configuration (like decorators) before running tests, and verifies the configuration is applied to rendered stories @test

Implementation

@generates

API

/**
 * Test suite that validates components by reusing their Storybook stories.
 * Tests should import stories and render them in a testing framework
 * to verify component behavior outside of Storybook.
 */

Dependencies { .dependencies }

@storybook/react { .dependency }

Provides utilities for reusing Storybook stories in external testing environments.

@satisfied-by

@testing-library/react { .dependency }

Provides React component testing utilities for rendering and querying components.

@satisfied-by

vitest { .dependency }

Provides the testing framework for running unit tests.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-storybook--addon-backgrounds

tile.json