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 163771dc_2bac_6cad_83dd_e165581f95a3["default.test()"] a7c8543b_e224_c14c_2c49_f5bcf8706e78["_config.js"] 163771dc_2bac_6cad_83dd_e165581f95a3 -->|defined in| a7c8543b_e224_c14c_2c49_f5bcf8706e78 style 163771dc_2bac_6cad_83dd_e165581f95a3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/await-then-catch-event/_config.js lines 22–50
test({ assert, component, target, window }) {
deferred.resolve(42);
return deferred.promise
.then(async () => {
await tick();
assert.htmlEqual(target.innerHTML, '<button>click me</button>');
const { button } = component;
const click = new window.Event('click', { bubbles: true });
button.dispatchEvent(click);
assert.equal(component.clicked, 42);
const thePromise = Promise.resolve(43);
component.thePromise = thePromise;
return thePromise;
})
.then(() => {
const { button } = component;
const click = new window.Event('click', { bubbles: true });
button.dispatchEvent(click);
assert.equal(component.clicked, 43);
});
}
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/await-then-catch-event/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/await-then-catch-event/_config.js at line 22.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free