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 ae6faf24_ea89_2cea_ff5b_452f037c6108["default.test()"] f4130bf5_e682_3793_4c13_2d4f8a588193["_config.js"] ae6faf24_ea89_2cea_ff5b_452f037c6108 -->|defined in| f4130bf5_e682_3793_4c13_2d4f8a588193 style ae6faf24_ea89_2cea_ff5b_452f037c6108 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/_config.js lines 63–326
test({ assert, target }) {
const [
btn_5_1,
btn_undefined_1,
btn_5_2,
btn_undefined_2,
btn_5_3,
btn_undefined_3,
btn_5_4,
btn_undefined_4,
btn_all_10,
btn_all_undefined
] = target.querySelectorAll('button');
btn_undefined_1.click();
btn_undefined_2.click();
btn_undefined_3.click();
btn_undefined_4.click();
flushSync();
assert.htmlEqual(
target.innerHTML,
`
<p>props undefined:</p>
<p>
readonly:
readonlyWithDefault: 1
binding:
</p>
<button>set bindings to 5</button>
<button>set bindings to undefined</button>
<p>props defined:</p>
<p>
readonly: 0
readonlyWithDefault: 0
binding:
</p>
<button>set bindings to 5</button>
<button>set bindings to undefined</button>
<p>bindings undefined:</p>
<p>
readonly:
readonlyWithDefault: 1
binding:
</p>
<button>set bindings to 5</button>
<button>set bindings to undefined</button>
<p>bindings defined:</p>
<p>
readonly: 0
readonlyWithDefault: 0
binding:
</p>
<button>set bindings to 5</button>
<button>set bindings to undefined</button>
<p>
Main:
readonly_undefined:
readonlyWithDefault_undefined:
binding_undefined:
readonly_defined: 0
readonlyWithDefault_defined: 0
binding_defined: 0
bind_readonly_undefined:
bind_binding_undefined:
bind_readonly_defined: 0
bind_binding_defined:
</p>
<button>set everything to 10</button>
<button>set everything to undefined</button>
`
);
btn_5_1.click();
btn_5_2.click();
btn_5_3.click();
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/props-default-value-behavior/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-runes/samples/props-default-value-behavior/_config.js at line 63.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free