_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 70656a59_cc1a_ddc4_e8ef_12bf9fe2529d["_config.js"] 2a2d28a9_d1e5_6b47_9375_279552e7c7f8["assert.js"] 70656a59_cc1a_ddc4_e8ef_12bf9fe2529d --> 2a2d28a9_d1e5_6b47_9375_279552e7c7f8 07d76165_84db_aa3e_f8fc_c7c9c3a10163["test"] 70656a59_cc1a_ddc4_e8ef_12bf9fe2529d --> 07d76165_84db_aa3e_f8fc_c7c9c3a10163 style 70656a59_cc1a_ddc4_e8ef_12bf9fe2529d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { test } from '../../assert';
// Browsers split text nodes > 65536 characters into multiple consecutive text nodes
// during HTML parsing. This test verifies that hydration correctly merges them.
const LARGE_TEXT = 'x'.repeat(70000);
export default test({
mode: ['hydrate'],
skip_mode: ['client'],
props: {
text: LARGE_TEXT
},
async test({ assert, target }) {
const [p] = target.querySelectorAll('p');
// The text content should be preserved after hydration
assert.equal(p.textContent?.trim(), LARGE_TEXT);
// After hydration, there should be only one text node (plus possible comment nodes)
const textNodes = [...p.childNodes].filter((node) => node.nodeType === 3);
assert.equal(textNodes.length, 1, `Expected 1 text node, got ${textNodes.length}`);
}
});
Domain
Subdomains
Functions
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 1 function(s): default.test.
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/samples/hydrate-large-text-node/_config.js (domain: BuildSystem, subdomain: MessageProcessor, directory: packages/svelte/tests/runtime-browser/samples/hydrate-large-text-node).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free