assert_html_equal_with_options() — svelte Function Reference
Architecture documentation for the assert_html_equal_with_options() function in html_equal.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 1c541d89_49ad_09df_1b04_218f8bcb99e8["assert_html_equal_with_options()"] 7e13368c_af2f_099c_e7e1_de404629548f["html_equal.js"] 1c541d89_49ad_09df_1b04_218f8bcb99e8 -->|defined in| 7e13368c_af2f_099c_e7e1_de404629548f c627c8cf_80df_35b6_78ac_d5d21ef657b2["run_ssr_test()"] c627c8cf_80df_35b6_78ac_d5d21ef657b2 -->|calls| 1c541d89_49ad_09df_1b04_218f8bcb99e8 1edde895_4b1f_7b83_74c8_3640bf220ca9["run_test_variant()"] 1edde895_4b1f_7b83_74c8_3640bf220ca9 -->|calls| 1c541d89_49ad_09df_1b04_218f8bcb99e8 bcb4a799_b3e7_1c05_85fe_63bf9b925a94["normalize_new_line()"] 1c541d89_49ad_09df_1b04_218f8bcb99e8 -->|calls| bcb4a799_b3e7_1c05_85fe_63bf9b925a94 962cf561_9ad9_cab0_dcda_622ebeb2d812["normalize_html()"] 1c541d89_49ad_09df_1b04_218f8bcb99e8 -->|calls| 962cf561_9ad9_cab0_dcda_622ebeb2d812 style 1c541d89_49ad_09df_1b04_218f8bcb99e8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/tests/html_equal.js lines 165–192
export const assert_html_equal_with_options = (
actual,
expected,
{ preserveComments, withoutNormalizeHtml },
message
) => {
try {
assert.deepEqual(
withoutNormalizeHtml
? normalize_new_line(actual.trim()).replace(
/(<!(--)?.*?\2>)/g,
preserveComments !== false ? '$1' : ''
)
: normalize_html(window, actual.trim(), { preserveComments }),
withoutNormalizeHtml
? normalize_new_line(expected.trim()).replace(
/(<!(--)?.*?\2>)/g,
preserveComments !== false ? '$1' : ''
)
: normalize_html(window, expected.trim(), { preserveComments }),
message
);
} catch (e) {
if (Error.captureStackTrace)
Error.captureStackTrace(/** @type {Error} */ (e), assert_html_equal_with_options);
throw e;
}
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does assert_html_equal_with_options() do?
assert_html_equal_with_options() is a function in the svelte codebase, defined in packages/svelte/tests/html_equal.js.
Where is assert_html_equal_with_options() defined?
assert_html_equal_with_options() is defined in packages/svelte/tests/html_equal.js at line 165.
What does assert_html_equal_with_options() call?
assert_html_equal_with_options() calls 2 function(s): normalize_html, normalize_new_line.
What calls assert_html_equal_with_options()?
assert_html_equal_with_options() is called by 2 function(s): run_ssr_test, run_test_variant.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free