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

Relationship Graph

Source Code

packages/svelte/tests/runtime-legacy/samples/head-raw-dynamic/_config.js lines 11–25

	test({ assert, component, window }) {
		assert.equal(window.document.head.innerHTML.includes(foo), true);

		component.condition = 3;
		assert.equal(window.document.head.innerHTML.includes(foo), false);

		component.condition = 2;
		assert.equal(window.document.title, 'bar!!!');
		assert.equal(window.document.head.innerHTML.includes(bar), true);
		assert.equal(Boolean(window.document.getElementById('meta')), true);

		component.condition = 3;
		assert.equal(window.document.head.innerHTML.includes(bar), false);
		assert.equal(window.document.getElementById('meta'), null);
	}

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/head-raw-dynamic/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/head-raw-dynamic/_config.js at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free