Home / File/ _config.js — svelte Source File

_config.js — svelte Source File

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

Entity Profile

Dependency Diagram

graph LR
  07f66935_d4d8_3a90_645d_7c49fd68d57a["_config.js"]
  654af6d6_2570_6860_f8dd_6b6131e1eec4["test.ts"]
  07f66935_d4d8_3a90_645d_7c49fd68d57a --> 654af6d6_2570_6860_f8dd_6b6131e1eec4
  a9e40468_e7e2_3062_61b4_08dd643a25cc["data.js"]
  07f66935_d4d8_3a90_645d_7c49fd68d57a --> a9e40468_e7e2_3062_61b4_08dd643a25cc
  251b118a_ce21_188a_11ea_559e5feb5e71["reset_numbers"]
  07f66935_d4d8_3a90_645d_7c49fd68d57a --> 251b118a_ce21_188a_11ea_559e5feb5e71
  4ead6623_c53e_ab40_5690_64903d5addf1["svelte"]
  07f66935_d4d8_3a90_645d_7c49fd68d57a --> 4ead6623_c53e_ab40_5690_64903d5addf1
  style 07f66935_d4d8_3a90_645d_7c49fd68d57a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { flushSync } from 'svelte';
import { ok, test } from '../../test';
import { reset_numbers } from './data';

export default test({
	html: `
		import
		<p>1 + 2 + 3 + 4 = 10</p>
		local
		<p>1 + 2 + 3 + 4 = 10</p>
		<button>Add a number</button>
	`,
	before_test() {
		reset_numbers();
	},
	async test({ assert, target, window }) {
		const btn = target.querySelector('button');
		ok(btn);

		const clickEvent = new window.MouseEvent('click', { bubbles: true });

		flushSync(() => {
			btn.dispatchEvent(clickEvent);
		});

		assert.htmlEqual(
			target.innerHTML,
			`
			import
			<p>1 + 2 + 3 + 4 + 5 = 15</p>
			local
			<p>1 + 2 + 3 + 4 + 5 = 15</p>
			<button>Add a number</button>
		`
		);

		flushSync(() => {
			btn.dispatchEvent(clickEvent);
		});

		assert.htmlEqual(
			target.innerHTML,
			`
			import
			<p>1 + 2 + 3 + 4 + 5 + 6 = 21</p>
			local
			<p>1 + 2 + 3 + 4 + 5 + 6 = 21</p>
			<button>Add a number</button>
		`
		);
	}
});

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, MessageProcessor subdomain.
What functions are defined in _config.js?
_config.js defines 2 function(s): default.before_test, default.test.
What does _config.js depend on?
_config.js imports 4 module(s): data.js, reset_numbers, svelte, test.ts.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/runtime-legacy/samples/reactive-import-statement/_config.js (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/runtime-legacy/samples/reactive-import-statement).

Analyze Your Own Codebase

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

Try Supermodel Free