Home / Function/ default.test() — svelte Function Reference

default.test() — svelte Function Reference

Architecture documentation for the default.test() function in _config.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  a75cc044_be14_b7d6_1ee0_b771f3533a61["default.test()"]
  a35a322c_f8cd_5f5a_9e8d_c0068db9cac2["_config.js"]
  a75cc044_be14_b7d6_1ee0_b771f3533a61 -->|defined in| a35a322c_f8cd_5f5a_9e8d_c0068db9cac2
  style a75cc044_be14_b7d6_1ee0_b771f3533a61 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/tests/runtime-runes/samples/async-prop/_config.js lines 12–50

	async test({ assert, target }) {
		const [reset, hello, again] = target.querySelectorAll('button');

		hello.click();
		await tick();
		assert.htmlEqual(
			target.innerHTML,
			`
				<button>reset</button>
				<button>hello</button>
				<button>again</button>
				<h1>hello</h1>
			`
		);

		reset.click();
		await tick();
		assert.htmlEqual(
			target.innerHTML,
			`
				<button>reset</button>
				<button>hello</button>
				<button>again</button>
				<h1>hello</h1>
			`
		);

		again.click();
		await tick();
		assert.htmlEqual(
			target.innerHTML,
			`
				<button>reset</button>
				<button>hello</button>
				<button>again</button>
				<h1>hello again</h1>
			`
		);
	}

Domain

Subdomains

Frequently Asked Questions

What does default.test() do?
default.test() is a function in the svelte codebase, defined in packages/svelte/tests/runtime-runes/samples/async-prop/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-runes/samples/async-prop/_config.js at line 12.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free