Home / File/ _config.js — svelte Source File

_config.js — svelte Source File

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

Entity Profile

Dependency Diagram

graph LR
  c14c961e_ecda_c703_9c5a_82691a6860ea["_config.js"]
  654af6d6_2570_6860_f8dd_6b6131e1eec4["test.ts"]
  c14c961e_ecda_c703_9c5a_82691a6860ea --> 654af6d6_2570_6860_f8dd_6b6131e1eec4
  style c14c961e_ecda_c703_9c5a_82691a6860ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { test } from '../../test';

// expect aborting halfway through outro transition
// to behave the same in `{#if}` block as in `{:else}` block
export default test({
	html: `
		<div>a</div>

		<div>a</div>
	`,

	async test({ assert, component, target, raf }) {
		component.visible = false;

		raf.tick(25);
		assert.htmlEqual(
			target.innerHTML,
			`
			<div style="opacity: 0.75;">a</div>
			<div style="opacity: 0.75;">a</div>
		`
		);

		// abort 1/4 through the outro transition
		await component.$set({
			visible: true,
			array: ['a', 'b', 'c']
		});

		raf.tick(25);

		raf.tick(50);
		assert.htmlEqual(
			target.innerHTML,
			// because outro is aborted it will be finished earlier with the intro than the new items
			`
			<div style="">a</div>
			<div style="opacity: 0.25;">b</div>
			<div style="opacity: 0.25;">c</div>

			<div style="">a</div>
			<div style="opacity: 0.25;">b</div>
			<div style="opacity: 0.25;">c</div>
		`
		);

		// intros of new items almost finished, aborted outro shouldn't overlap re-intro
		raf.tick(75);
		assert.htmlEqual(
			target.innerHTML,
			`
			<div style="">a</div>
			<div style="opacity: 0.5;">b</div>
			<div style="opacity: 0.5;">c</div>

			<div style="">a</div>
			<div style="opacity: 0.5;">b</div>
			<div style="opacity: 0.5;">c</div>
		`
		);
	}
});

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, MessageProcessor 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 1 module(s): test.ts.
Where is _config.js in the architecture?
_config.js is located at packages/svelte/tests/runtime-legacy/samples/transition-abort/_config.js (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/runtime-legacy/samples/transition-abort).

Analyze Your Own Codebase

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

Try Supermodel Free