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

Relationship Graph

Source Code

packages/svelte/tests/runtime-runes/samples/svelte-meta-parent/_config.js lines 23–185

	async test({ target, assert }) {
		function check() {
			const [main, if_, each, await_, key, child1, child2, child3, child4, dynamic] =
				target.querySelectorAll('p');

			// @ts-expect-error
			assert.deepEqual(main.__svelte_meta.parent, null);

			// @ts-expect-error
			assert.deepEqual(if_.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'if',
				line: 12,
				column: 0,
				parent: null
			});

			// @ts-expect-error
			assert.deepEqual(each.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'each',
				line: 16,
				column: 0,
				parent: null
			});

			// @ts-expect-error
			assert.deepEqual(await_.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'await',
				line: 20,
				column: 0,
				parent: null
			});

			// @ts-expect-error
			assert.deepEqual(key.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'key',
				line: 26,
				column: 0,
				parent: null
			});

			// @ts-expect-error
			assert.deepEqual(child1.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'component',
				componentTag: 'Child',
				line: 30,
				column: 0,
				parent: null
			});

			// @ts-expect-error
			assert.deepEqual(child2.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'component',
				componentTag: 'Child',
				line: 33,
				column: 1,
				parent: {
					file: 'passthrough.svelte',
					type: 'render',
					line: 5,
					column: 0,
					parent: {
						file: 'main.svelte',
						type: 'component',
						componentTag: 'Passthrough',
						line: 32,
						column: 0,
						parent: null
					}
				}
			});

			// @ts-expect-error
			assert.deepEqual(child3.__svelte_meta.parent, {
				file: 'main.svelte',
				type: 'component',

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/svelte-meta-parent/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-runes/samples/svelte-meta-parent/_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