default.before_test() — svelte Function Reference
Architecture documentation for the default.before_test() function in _config.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD a5296f33_19cc_0849_4e97_356ed21e64f5["default.before_test()"] 4e5bda74_26e7_452b_17a5_d2ed95a9ee83["_config.js"] a5296f33_19cc_0849_4e97_356ed21e64f5 -->|defined in| 4e5bda74_26e7_452b_17a5_d2ed95a9ee83 style a5296f33_19cc_0849_4e97_356ed21e64f5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/hydration/samples/element-attribute-unchanged-2/_config.js lines 9–18
before_test() {
orig = Element.prototype.setAttribute;
Element.prototype.setAttribute = function () {
const stack = new Error().stack;
if (stack?.includes('render.js')) {
throw new Error('setAttribute called during hydration');
}
return orig.apply(this, arguments);
};
},
Domain
Subdomains
Source
Frequently Asked Questions
What does default.before_test() do?
default.before_test() is a function in the svelte codebase, defined in packages/svelte/tests/hydration/samples/element-attribute-unchanged-2/_config.js.
Where is default.before_test() defined?
default.before_test() is defined in packages/svelte/tests/hydration/samples/element-attribute-unchanged-2/_config.js at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free