import {join, dirname} from "node:path"; import {test, expect} from "@jest/globals"; import urlPlugin from "@rollup/plugin-url"; import html from "../../src/index.ts"; import {runBrowserTest} from "../util/browser-test.ts"; import {fileURLToPath} from "node:url"; import handlebars from "handlebars"; import {serializer} from "../util/index.ts"; const __dirname = dirname(fileURLToPath(import.meta.url)); process.chdir(join(__dirname, 'fixtures')); const defaultAssetInclude = [ '**/*.(png|jpg|jpeg|gif|ico|svg)',// images, svg '**/*.(woff|woff2|eot|ttf|otf)',// fonts '**/*.(webm|mp4)',// video ]; test('evaluated-web-bundle', async ()=>{ expect.addSnapshotSerializer(serializer); const out = await runBrowserTest({ input: 'index.hbs', treeshake: 'smallest', plugins: [ html({ include: [ '**/*.(html|hbs)',// html or handlebars ], transform(src) { return handlebars.compile(src)({ head: `