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
  54652a33_9d92_9655_4874_45693261fdb6["default.test()"]
  7922b54f_0144_9d13_f9ff_cce204fb4d3e["_config.js"]
  54652a33_9d92_9655_4874_45693261fdb6 -->|defined in| 7922b54f_0144_9d13_f9ff_cce204fb4d3e
  style 54652a33_9d92_9655_4874_45693261fdb6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/tests/runtime-legacy/samples/each-block-destructured-object-binding/_config.js lines 23–54

	test({ assert, component, target, window }) {
		const inputs = target.querySelectorAll('input');

		inputs[1].value = 'Oz';
		inputs[1].dispatchEvent(new window.Event('input'));
		flushSync();

		const { people } = component;

		assert.deepEqual(people, [{ name: { first: 'Doctor', last: 'Oz' } }]);

		assert.htmlEqual(
			target.innerHTML,
			`
			<input>
			<input>
			<p>Doctor Oz</p>
		`
		);

		people[0].name.first = 'Frank';
		component.people = people;

		assert.htmlEqual(
			target.innerHTML,
			`
			<input>
			<input>
			<p>Frank Oz</p>
		`
		);
	}

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-legacy/samples/each-block-destructured-object-binding/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/each-block-destructured-object-binding/_config.js at line 23.

Analyze Your Own Codebase

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

Try Supermodel Free