Home / File/ _config.js — svelte Source File

_config.js — svelte Source File

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

File javascript BuildSystem QualityControl 3 imports 1 functions

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

import { assert_ok, test } from '../../assert';

export default test({
	props: {
		rectColor1: 'green',
		circleColor1: 'red',
		rectColor2: 'black',
		circleColor2: 'blue'
	},
	html: `
		<svg xmlns="http://www.w3.org/2000/svg">
			<g style="--rect-color: green; --circle-color: red;">
				<g id="svg-1">
					<circle cx="50" cy="50" r="10" class="svelte-1qzlp1k"></circle>
					<rect width="100" height="100" class="svelte-1qzlp1k"></rect>
				</g>
			</g>
			<g style="--rect-color: black; --circle-color: blue;">
				<g id="svg-2">
					<circle cx="50" cy="50" r="10" class="svelte-1qzlp1k"></circle>
					<rect width="100" height="100" class="svelte-1qzlp1k"></rect>
				</g>
			</g>
		</svg>
	`,
	test({ component, assert, target }) {
		component.rectColor1 = 'yellow';
		component.circleColor2 = 'cyan';

		assert.htmlEqual(
			target.innerHTML,
			`
			<svg xmlns="http://www.w3.org/2000/svg">
				<g style="--rect-color: yellow; --circle-color: red;">
					<g id="svg-1">
						<circle cx="50" cy="50" r="10" class="svelte-1qzlp1k"></circle>
						<rect width="100" height="100" class="svelte-1qzlp1k"></rect>
					</g>
				</g>
				<g style="--rect-color: black; --circle-color: cyan;">
					<g id="svg-2">
						<circle cx="50" cy="50" r="10" class="svelte-1qzlp1k"></circle>
						<rect width="100" height="100" class="svelte-1qzlp1k"></rect>
					</g>
				</g>
			</svg>
		`
		);

		const circle_color1 = target.querySelector('#svg-1 circle');
		const rect_color1 = target.querySelector('#svg-1 rect');
		const circle_color2 = target.querySelector('#svg-2 circle');
		const rect_color2 = target.querySelector('#svg-2 rect');

		assert_ok(circle_color1);
		assert_ok(rect_color1);
		assert_ok(circle_color2);
		assert_ok(rect_color2);

		assert.htmlEqual(window.getComputedStyle(circle_color1).fill, 'rgb(255, 0, 0)');
		assert.htmlEqual(window.getComputedStyle(rect_color1).fill, 'rgb(255, 255, 0)');
		assert.htmlEqual(window.getComputedStyle(circle_color2).fill, 'rgb(0, 255, 255)');
		assert.htmlEqual(window.getComputedStyle(rect_color2).fill, 'rgb(0, 0, 0)');
	}
});

Domain

Subdomains

Functions

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 1 function(s): default.test.
What does _config.js depend on?
_config.js imports 3 module(s): assert.js, assert_ok, test.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/runtime-browser/samples/component-css-custom-properties-dynamic-svg/_config.js (domain: BuildSystem, subdomain: QualityControl, directory: packages/svelte/tests/runtime-browser/samples/component-css-custom-properties-dynamic-svg).

Analyze Your Own Codebase

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

Try Supermodel Free