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,6 +1,6 @@
import {join, dirname} from "node:path";
import {test, expect} from "@jest/globals";
import test from "ava";
import { rollup } from "rollup";
import {debugPrintOutput, getCode} from "../util/index.ts";
@@ -25,7 +25,8 @@ const defaultAssetInclude = [
'**/*.(webm|mp4)',// video
];
test.serial('js-import', async (t) => {
test('js-import', async () => {
const bundle = await rollup({
input: 'index.js',
plugins: [
@@ -40,7 +41,7 @@ test.serial('js-import', async (t) => {
});
const code = await getCode(bundle, output);
debugPrintOutput('js-import',code);
t.snapshot(code);
expect(code).toMatchSnapshot();
});