import assert from 'node:assert/strict' import { test } from 'node:test' import { htmlFacts } from '../html-checks.js' test('extracts decoded attributes regardless of quote style or order', () => { const facts = htmlFacts(` Go

Title

code`) assert.equal(facts.hasViewport, true) assert.deepEqual(facts.ids, ['a&b']) assert.deepEqual(facts.hrefs, ['#a&b']) assert.deepEqual(facts.languages, ['js']) }) test('ignores markup-like text in scripts and comments', () => { const facts = htmlFacts(` `) assert.deepEqual(facts.ids, []) assert.deepEqual(facts.hrefs, []) assert.equal(facts.hasHeadingElement, false) assert.equal(facts.isDraft, true) })