Menu
Libraries |
Category

jest-preview

  • Purpose: Jest Preview helps developers debug Jest tests by previewing the actual app's HTML in a browser, making it easier to visualize and debug UI during testing.
  • Target Audience: Frontend developers using Jest for testing, with support for multiple frameworks including React, Next.js, Svelte, Angular, and Vue.
  • Key Features:
    • Preview HTML output in a browser with auto-reload on changes.
    • Supports CSS (direct imports, CSS-in-JS libraries like Styled-components and Emotion, global CSS, CSS Modules, and Sass).
    • Supports viewing images.
    • Framework-agnostic but works well with react-testing-library.
  • Svelte Support: Explicitly mentioned as a supported framework with a dedicated example here .
  • Usage Example: Simply import and use preview.debug() or debug() in your test files to preview the rendered UI.
  • Advanced Configurations: Supports custom code transformations for complex setups.
  • Community & Support: Active Discord community, GitHub discussions, and Twitter support.

jestfrontendtestingproductivitydebugjavascripttestreactcssjest-view-htmlnextjssvelteangularvue

Comments