_config.js — svelte Source File
Architecture documentation for _config.js, a javascript file in the svelte codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8db7b4d2_462a_9984_841a_c3f95bf554e5["_config.js"] 654af6d6_2570_6860_f8dd_6b6131e1eec4["test.ts"] 8db7b4d2_462a_9984_841a_c3f95bf554e5 --> 654af6d6_2570_6860_f8dd_6b6131e1eec4 4ead6623_c53e_ab40_5690_64903d5addf1["svelte"] 8db7b4d2_462a_9984_841a_c3f95bf554e5 --> 4ead6623_c53e_ab40_5690_64903d5addf1 style 8db7b4d2_462a_9984_841a_c3f95bf554e5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { flushSync } from 'svelte';
import { test } from '../../test';
/** @type {Window['scrollTo']} */
let original_scrollTo;
export default test({
before_test() {
Object.defineProperties(window, {
scrollY: {
value: 0,
configurable: true
}
});
original_scrollTo = window.scrollTo;
// @ts-ignore
window.scrollTo = (x, y) => {};
},
after_test() {
window.scrollTo = original_scrollTo;
},
test({ assert, target, window }) {
assert.equal(window.scrollY, 0);
const event = new window.Event('scroll');
Object.defineProperties(window, {
scrollY: {
value: 234,
configurable: true
}
});
window.dispatchEvent(event);
flushSync();
assert.htmlEqual(
target.innerHTML,
'<p style="position: fixed; top: 1em; left: 1em;">scroll\ny\nis\n234.\n234\n*\n234\n=\n54756</p><div style="height: 9999px"></div>'
);
}
});
Domain
Subdomains
Dependencies
- svelte
- test.ts
Source
Frequently Asked Questions
What does _config.js do?
_config.js is a source file in the svelte codebase, written in javascript. It belongs to the BuildSystem domain, MessageProcessor subdomain.
What functions are defined in _config.js?
_config.js defines 3 function(s): default.after_test, default.before_test, default.test.
What does _config.js depend on?
_config.js imports 2 module(s): svelte, test.ts.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/runtime-legacy/samples/window-binding-scroll-store/_config.js (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/runtime-legacy/samples/window-binding-scroll-store).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free