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 6a302c42_ddec_de72_090b_dc1bdeba218a["default.test()"] 881449bd_8f82_ccb6_fa2d_121545181394["_config.js"] 6a302c42_ddec_de72_090b_dc1bdeba218a -->|defined in| 881449bd_8f82_ccb6_fa2d_121545181394 style 6a302c42_ddec_de72_090b_dc1bdeba218a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/binding-this-each-block-property-2/_config.js lines 19–58
test({ assert, component, target }) {
assert.equal(calls.length, 1);
assert.equal(calls[0].length, 0);
flushSync(() => component.addItem());
let divs = target.querySelectorAll('div');
assert.equal(calls.length, 3);
assert.equal(calls[1].length, 1);
assert.equal(calls[1][0].ref, null);
assert.equal(calls[2].length, 1);
assert.equal(calls[2][0].ref, divs[0]);
flushSync(() => component.addItem());
divs = target.querySelectorAll('div');
assert.equal(calls.length, 5);
assert.equal(calls[3].length, 2);
assert.equal(calls[3][0].ref, divs[0]);
assert.equal(calls[3][1].ref, null);
assert.equal(calls[4].length, 2);
assert.equal(calls[4][0].ref, divs[0]);
assert.equal(calls[4][1].ref, divs[1]);
flushSync(() => component.addItem());
divs = target.querySelectorAll('div');
assert.equal(calls.length, 7);
assert.equal(calls[5].length, 3);
assert.equal(calls[5][0].ref, divs[0]);
assert.equal(calls[5][1].ref, divs[1]);
assert.equal(calls[5][2].ref, null);
assert.equal(calls[6].length, 3);
assert.equal(calls[6][0].ref, divs[0]);
assert.equal(calls[6][1].ref, divs[1]);
assert.equal(calls[6][2].ref, divs[2]);
}
Domain
Subdomains
Defined In
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/binding-this-each-block-property-2/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/binding-this-each-block-property-2/_config.js at line 19.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free