import { describe, it, expect } from 'vitest'; import type { Document, Element } from 'domhandler'; import { getParse } from './parse.js'; import { parseDocument as parseWithHtmlparser2 } from 'htmlparser2'; import { parseWithParse5 } from './parsers/parse5-adapter.js'; const defaultOpts = { _useHtmlParser2: false }; const parse = getParse((content, options, isDocument, context) => options._useHtmlParser2 ? parseWithHtmlparser2(content, options) : parseWithParse5(content, options, isDocument, context), ); // Tags const basic = '