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 ca54e0e8_5631_9924_715b_0fcd7dab64e0["default.test()"] 3e039f91_c7d2_cff7_3d95_e01c1f70bf0a["_config.js"] ca54e0e8_5631_9924_715b_0fcd7dab64e0 -->|defined in| 3e039f91_c7d2_cff7_3d95_e01c1f70bf0a style ca54e0e8_5631_9924_715b_0fcd7dab64e0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/binding-contenteditable-innertext/_config.js lines 13–33
async test({ assert, component, target, window }) {
// JSDom doesn't support innerText yet, so the test is not ideal
// https://github.com/jsdom/jsdom/issues/1245
const el = target.querySelector('editor');
ok(el);
// @ts-expect-error
assert.equal(el.innerText, 'world');
const event = new window.Event('input');
// @ts-expect-error
el.innerText = 'everybody';
await el.dispatchEvent(event);
assert.equal(component.name, 'everybody');
component.name = 'goodbye';
// @ts-expect-error
assert.equal(el.innerText, 'goodbye');
}
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-contenteditable-innertext/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/binding-contenteditable-innertext/_config.js at line 13.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free