MCPcopy
hub / github.com/freshframework/fresh / parseHtml

Function parseHtml

packages/fresh/tests/test_utils.tsx:241–250  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

239}
240
241export function parseHtml(input: string): TestDocument {
242 // deno-lint-ignore no-explicit-any
243 const doc = new DOMParser().parseFromString(input, "text/html") as any;
244 Object.defineProperty(doc, "debug", {
245 // deno-lint-ignore no-console
246 value: () => console.log(prettyDom(doc)),
247 enumerable: false,
248 });
249 return doc;
250}
251
252export function assertSelector(doc: Document, selector: string) {
253 if (doc.querySelector(selector) === null) {

Callers 9

fs_routes_test.tsxFile · 0.90
context_test.tsxFile · 0.90
partials_test.tsxFile · 0.90
islands_test.tsxFile · 0.90
head_test.tsxFile · 0.90
withBrowserFunction · 0.85
waitForTextFunction · 0.85

Calls 1

prettyDomFunction · 0.85

Tested by

no test coverage detected