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 6bececc6_5061_bed7_62e9_2bc51601e20a["default.test()"] 9aa03497_6c1f_1225_d5e1_0fd616b1d4b6["_config.js"] 6bececc6_5061_bed7_62e9_2bc51601e20a -->|defined in| 9aa03497_6c1f_1225_d5e1_0fd616b1d4b6 style 6bececc6_5061_bed7_62e9_2bc51601e20a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-runes/samples/each-updates-10/_config.js lines 5–50
async test({ assert, target }) {
const [add, adjust] = target.querySelectorAll('button');
add.click();
flushSync();
assert.htmlEqual(
target.innerHTML,
`<button>add</button> <button>adjust</button>
<h2>Keyed</h2>
<div>Item: 1. Index: 0</div>
<div>Item: 0. Index: 1</div>
<h2>Unkeyed</h2>
<div>Item: 1. Index: 0</div>
<div>Item: 0. Index: 1</div>`
);
add.click();
flushSync();
assert.htmlEqual(
target.innerHTML,
`<button>add</button> <button>adjust</button>
<h2>Keyed</h2>
<div>Item: 2. Index: 0</div>
<div>Item: 1. Index: 1</div>
<div>Item: 0. Index: 2</div>
<h2>Unkeyed</h2>
<div>Item: 2. Index: 0</div>
<div>Item: 1. Index: 1</div>
<div>Item: 0. Index: 2</div>`
);
adjust.click();
flushSync();
assert.htmlEqual(
target.innerHTML,
`<button>add</button> <button>adjust</button>
<h2>Keyed</h2>
<div>Item: 2. Index: 0</div>
<div>Item: 1. Index: 1</div>
<div>Item: 10. Index: 2</div>
<h2>Unkeyed</h2>
<div>Item: 2. Index: 0</div>
<div>Item: 1. Index: 1</div>
<div>Item: 10. Index: 2</div>`
);
}
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-runes/samples/each-updates-10/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-runes/samples/each-updates-10/_config.js at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free