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 683c7cd7_f90f_ab91_795a_a93582419068["default.test()"] a85576d0_31f6_3b3b_71c7_3b094b184404["_config.js"] 683c7cd7_f90f_ab91_795a_a93582419068 -->|defined in| a85576d0_31f6_3b3b_71c7_3b094b184404 style 683c7cd7_f90f_ab91_795a_a93582419068 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/component-slot-fallback-2/_config.js lines 8–44
test({ assert, target, component, window }) {
const [input1, input2, inputFallback] = target.querySelectorAll('input');
// TODO this works differently now, deduplicates to one subscription - ok?
// assert.equal(component.getSubscriberCount(), 3);
input1.value = 'a';
input1.dispatchEvent(new window.Event('input'));
flushSync();
input1.value = 'ab';
input1.dispatchEvent(new window.Event('input'));
flushSync();
assert.equal(input1.value, 'ab');
assert.equal(input2.value, 'ab');
assert.equal(inputFallback.value, 'ab');
component.props = 'hello';
assert.htmlEqual(
target.innerHTML,
`
<input> hello
<input> hello
<input>
`
);
component.fallback = 'world';
assert.htmlEqual(
target.innerHTML,
`
<input> hello
<input> hello
<input> world
`
);
}
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/component-slot-fallback-2/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/component-slot-fallback-2/_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