import test from 'node:test'; import assert from 'node:assert/strict'; import { injectBeforeDocumentClosingBody, injectBeforeDocumentClosingHead, } from './html-document-injection.mjs'; test('injectBeforeDocumentClosingBody skips inside inline scripts', () => { const html = `

content

`; const result = injectBeforeDocumentClosingBody(html, '\n'); assert.match(result, /\+tb\+'<\/body><\/html>'/); assert.match(result, /