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

Relationship Graph

Source Code

packages/svelte/tests/runtime-runes/samples/hydratable-complex-nesting/_config.js lines 13–23

	async test({ assert, target, variant }) {
		// make sure hydration has a chance to finish
		await tick();
		const p = target.querySelector('p');
		ok(p);
		if (variant === 'hydrate') {
			assert.htmlEqual(p.outerHTML, '<p>The current environment is: server</p>');
		} else {
			assert.htmlEqual(p.outerHTML, '<p>The current environment is: browser</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-runes/samples/hydratable-complex-nesting/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-runes/samples/hydratable-complex-nesting/_config.js at line 13.

Analyze Your Own Codebase

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

Try Supermodel Free