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 052ebab8_5876_0478_757f_f94840530bf3["default.test()"] ef0ecf73_c42c_255e_799a_f562f55a9d3f["_config.js"] 052ebab8_5876_0478_757f_f94840530bf3 -->|defined in| ef0ecf73_c42c_255e_799a_f562f55a9d3f style 052ebab8_5876_0478_757f_f94840530bf3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/raw-anchor-next-previous-sibling/_config.js lines 8–23
test({ assert, component, target, variant }) {
const span = target.querySelector('span');
if (variant === 'dom') {
assert.equal(span?.previousSibling?.nodeName, 'BR');
// next.next because of comment anchor before which @html is inserted
assert.equal(span?.nextSibling?.nextSibling?.nodeName, 'BR');
} else {
// ssr comments inbetween
assert.equal(span?.previousSibling?.nodeName, '#comment');
assert.equal(span?.previousSibling?.previousSibling?.nodeName, 'BR');
assert.equal(span?.nextSibling?.nodeName, '#comment');
assert.equal(span?.nextSibling?.nextSibling?.nodeName, 'BR');
}
component.raw = '<span>bar</span>';
}
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/raw-anchor-next-previous-sibling/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/raw-anchor-next-previous-sibling/_config.js at line 8.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free