_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 881449bd_8f82_ccb6_fa2d_121545181394["_config.js"] 654af6d6_2570_6860_f8dd_6b6131e1eec4["test.ts"] 881449bd_8f82_ccb6_fa2d_121545181394 --> 654af6d6_2570_6860_f8dd_6b6131e1eec4 4ead6623_c53e_ab40_5690_64903d5addf1["svelte"] 881449bd_8f82_ccb6_fa2d_121545181394 --> 4ead6623_c53e_ab40_5690_64903d5addf1 style 881449bd_8f82_ccb6_fa2d_121545181394 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { test } from '../../test';
import { flushSync } from 'svelte';
/** @type {Array<Array<{ ref: HTMLElement }>>} */
let calls = [];
/** @param {Array<{ ref: HTMLElement }>} refs */
function callback(refs) {
calls.push(refs.map(({ ref }) => ({ ref })));
}
export default test({
html: '',
get props() {
return { callback };
},
before_test() {
calls = [];
},
test({ assert, component, target }) {
assert.equal(calls.length, 1);
assert.equal(calls[0].length, 0);
flushSync(() => component.addItem());
let divs = target.querySelectorAll('div');
assert.equal(calls.length, 3);
assert.equal(calls[1].length, 1);
assert.equal(calls[1][0].ref, null);
assert.equal(calls[2].length, 1);
assert.equal(calls[2][0].ref, divs[0]);
flushSync(() => component.addItem());
divs = target.querySelectorAll('div');
assert.equal(calls.length, 5);
assert.equal(calls[3].length, 2);
assert.equal(calls[3][0].ref, divs[0]);
assert.equal(calls[3][1].ref, null);
assert.equal(calls[4].length, 2);
assert.equal(calls[4][0].ref, divs[0]);
assert.equal(calls[4][1].ref, divs[1]);
flushSync(() => component.addItem());
divs = target.querySelectorAll('div');
assert.equal(calls.length, 7);
assert.equal(calls[5].length, 3);
assert.equal(calls[5][0].ref, divs[0]);
assert.equal(calls[5][1].ref, divs[1]);
assert.equal(calls[5][2].ref, null);
assert.equal(calls[6].length, 3);
assert.equal(calls[6][0].ref, divs[0]);
assert.equal(calls[6][1].ref, divs[1]);
assert.equal(calls[6][2].ref, divs[2]);
}
});
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 4 function(s): callback, default.before_test, default.props, 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/binding-this-each-block-property-2/_config.js (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/runtime-legacy/samples/binding-this-each-block-property-2).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free