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 e97e94ec_fc35_cfe7_e250_db955a37c1e0["default.test()"] 1ee5f5fb_4427_b812_004b_31a1f9418a59["_config.js"] e97e94ec_fc35_cfe7_e250_db955a37c1e0 -->|defined in| 1ee5f5fb_4427_b812_004b_31a1f9418a59 style e97e94ec_fc35_cfe7_e250_db955a37c1e0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/runtime-legacy/samples/inline-style-directive-shorthand/_config.js lines 9–26
test({ assert, component, target, window }) {
const [p1, p2] = target.querySelectorAll('p');
assert.equal(window.getComputedStyle(p1).color, 'rgb(255, 0, 0)');
assert.equal(window.getComputedStyle(p2).color, 'rgb(255, 0, 0)');
component.color = 'blue';
assert.htmlEqual(
target.innerHTML,
`
<p style="color: blue;"></p>
<p style="color: blue;"></p>
`
);
assert.equal(window.getComputedStyle(p1).color, 'rgb(0, 0, 255)');
assert.equal(window.getComputedStyle(p2).color, 'rgb(0, 0, 255)');
}
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/inline-style-directive-shorthand/_config.js.
Where is default.test() defined?
default.test() is defined in packages/svelte/tests/runtime-legacy/samples/inline-style-directive-shorthand/_config.js at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free