chore: switch to jest for testing

This commit is contained in:
2024-02-21 00:04:36 +01:00
parent 3b540d0c48
commit e46f668ac8
47 changed files with 50329 additions and 839 deletions

View File

@@ -1,7 +1,6 @@
import {join, dirname} from "node:path";
import {test, expect} from "@jest/globals";
import test from "ava";
import { rollup } from "rollup";
import urlPlugin from "@rollup/plugin-url";
import html from "../../src/index.ts";
@@ -20,7 +19,7 @@ const defaultAssetInclude = [
'**/*.(webm|mp4)',// video
];
test.serial('web-bundle', async (t) => {
test('evaluated-web-bundle', async ()=>{
const out = await runBrowserTest({
input: 'index.hbs',
treeshake: 'smallest',
@@ -38,7 +37,6 @@ test.serial('web-bundle', async (t) => {
],
}, {
path: 'index.html',
log: t.log,
},{
dir: 'output', // Output all files
format: 'es', // iifi and cjs should be added to tests
@@ -47,7 +45,5 @@ test.serial('web-bundle', async (t) => {
entryFileNames: '[name].[extname]',
assetFileNames: '[name].[extname]',
});
t.snapshot(out);
// await bundle.generate(output);
expect(out).toMatchSnapshot();
});