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

Relationship Graph

Source Code

packages/svelte/tests/runtime-runes/samples/effect-cleanup/_config.js lines 6–21

	async test({ assert, target, logs }) {
		const [b1] = target.querySelectorAll('button');
		flushSync(() => {
			b1.click();
		});
		flushSync(() => {
			b1.click();
		});

		// With async mode (which is on by default for runtime-runes) this works as expected, without it
		// it works differently: https://github.com/sveltejs/svelte/pull/15564
		assert.deepEqual(
			logs,
			async_mode ? ['init 0', 'cleanup 0', null, 'init 2', 'cleanup 2', null, 'init 4'] : ['init 0']
		);
	}

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/effect-cleanup/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-runes/samples/effect-cleanup/_config.js at line 6.

Analyze Your Own Codebase

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

Try Supermodel Free