Home / File/ _config.js — svelte Source File

_config.js — svelte Source File

Architecture documentation for _config.js, a javascript file in the svelte codebase. 2 imports, 0 dependents.

File javascript BuildSystem QualityControl 2 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  c8259962_b8a2_77cc_1a26_8b2b0c18631a["_config.js"]
  2a2d28a9_d1e5_6b47_9375_279552e7c7f8["assert.js"]
  c8259962_b8a2_77cc_1a26_8b2b0c18631a --> 2a2d28a9_d1e5_6b47_9375_279552e7c7f8
  07d76165_84db_aa3e_f8fc_c7c9c3a10163["test"]
  c8259962_b8a2_77cc_1a26_8b2b0c18631a --> 07d76165_84db_aa3e_f8fc_c7c9c3a10163
  style c8259962_b8a2_77cc_1a26_8b2b0c18631a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { test } from '../../assert';
const tick = () => Promise.resolve();

export default test({
	async test({ assert, target }) {
		target.innerHTML = '<custom-element></custom-element>';
		/** @type {any} */
		const el = target.querySelector('custom-element');

		/** @type {string[]} */
		const events = [];
		const custom_before = () => {
			events.push('before');
		};
		const click_before = () => {
			events.push('click_before');
		};
		el.addEventListener('custom', custom_before);
		el.addEventListener('click', click_before);

		await tick();

		el.addEventListener('custom', (e) => {
			events.push(e.detail);
		});
		el.addEventListener('click', () => {
			events.push('click');
		});

		el.shadowRoot.querySelector('button').click();
		assert.deepEqual(events, ['before', 'foo', 'click_before', 'click']);

		el.removeEventListener('custom', custom_before);
		el.removeEventListener('click', click_before);
		el.shadowRoot.querySelector('button').click();
		assert.deepEqual(events, ['before', 'foo', 'click_before', 'click', 'foo', 'click']);
	}
});

Domain

Subdomains

Dependencies

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, QualityControl subdomain.
What functions are defined in _config.js?
_config.js defines 2 function(s): default.test, tick.
What does _config.js depend on?
_config.js imports 2 module(s): assert.js, test.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/runtime-browser/custom-elements-samples/events/_config.js (domain: BuildSystem, subdomain: QualityControl, directory: packages/svelte/tests/runtime-browser/custom-elements-samples/events).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free