import assert from 'node:assert/strict'; import { existsSync, readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; const dist = fileURLToPath(new URL('../dist/', import.meta.url)); const html = readFileSync( new URL('../dist/index.html', import.meta.url), 'utf8' ); const assets = [...html.matchAll(/(?:href|src)="(\/assets\/[^"]+)"/g)].map( match => match[1] ); assert.match(html, /
<\/div>/); assert.match(html, /