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 28701652_4b21_005e_0104_7355035f2ace["default.test()"] 99c82d73_6509_5e76_16d0_96af1867775d["_config.js"] 28701652_4b21_005e_0104_7355035f2ace -->|defined in| 99c82d73_6509_5e76_16d0_96af1867775d style 28701652_4b21_005e_0104_7355035f2ace fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/each-block-dynamic-else-static/_config.js lines 16–44
test({ assert, component, target }) {
component.animals = [];
assert.htmlEqual(
target.innerHTML,
`
<p>no animals</p>
`
);
// trigger an 'update' of the else block, to ensure that
// nonexistent update method is not called
component.animals = [];
component.animals = ['wombat'];
assert.htmlEqual(
target.innerHTML,
`
<p>wombat</p>
`
);
component.animals = ['dinosaur'];
assert.htmlEqual(
target.innerHTML,
`
<p>dinosaur</p>
`
);
}
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-dynamic-else-static/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/each-block-dynamic-else-static/_config.js at line 16.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free