Skip to content

Release testing-library-agnostic rendering core #458

@mcous

Description

@mcous

@testing-library/svelte includes logic to render Svelte components into the DOM. It's mostly a thin wrapper around the svelte module itself, but it's got a few tricks up its sleeves:

  • Component mounting and cleanup
  • Wrapper DOM element creation, insertion, and cleanup
  • Compatibility layers for Svelte 3, 4, and 5, including TypeScript types
  • An extensive test suite across Svelte 3/4/5, jest/vitest, happy-dom/jsdom

All this logic is already separate from the "final" step of this library - binding @testing-library/dom queries to the rendered component. If it were to be published as its own library (@testing-library/svelte-core) without @testing-library/dom it could be used in other Svelte-testing contexts that bring their own query systems and don't need DOM Testing Library

See vitest-community/vitest-browser-svelte#3 for more details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions