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 13aa9b0e_3fc1_aff6_27a8_7a6afe2f51ab["default.test()"] e288b82b_a2f9_5d01_298c_836400716dc7["_config.js"] 13aa9b0e_3fc1_aff6_27a8_7a6afe2f51ab -->|defined in| e288b82b_a2f9_5d01_298c_836400716dc7 style 13aa9b0e_3fc1_aff6_27a8_7a6afe2f51ab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/each-block-keyed-non-prop/_config.js lines 14–33
test({ assert, component, target }) {
const [p1, p2, p3] = target.querySelectorAll('p');
component.words = ['foo', 'baz'];
assert.htmlEqual(
target.innerHTML,
`
<p>foo</p>
<p>baz</p>
`
);
const [p4, p5] = target.querySelectorAll('p');
assert.ok(!target.contains(p2), '`<p>` element should be removed');
assert.equal(p1, p4, 'first `<p>` element should be retained');
assert.equal(p3, p5, 'last `<p>` element should be retained');
}
Domain
Subdomains
Source
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-keyed-non-prop/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/each-block-keyed-non-prop/_config.js at line 14.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free