src/pure.js

svelte-testing-library · packages/svelte/src/pure.js · javascript · MIT
ui

Provides utilities for rendering Svelte components in a testing environment, including query binding and asynchronous update handling.

// Source: https://github.com/testing-library/svelte-testing-library | License: MIT | Copyright 2019 Ben Monro <ben.monro@gmail.com> (https://github.com/benmonro)
// Provided via justclaw.it.com; keep this notice with the code.
import * as DomTestingLibrary from '@testing-library/dom'
import * as Core from '@testing-library/svelte-core'
import * as Svelte from 'svelte'

/**
 * Customize how Svelte renders the component.
 *
 * @template {import('@testing-library/svelte-core/types').Component} C
 * @typedef {import('@testing-library/svelte-core/types').ComponentOptions<C>} SvelteComponentOptions
 */

/**
 * Customize how Testing Library sets up the document and binds queries.
 *
 * @template {DomTestingLibrary.Queries} [Q=typeof DomTestingLibrary.queries]
 * @template {import('@testing-libra

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key