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";
@@ -18,8 +18,7 @@ import {fileURLToPath} from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));
process.chdir(join(__dirname, 'fixtures'));
test.serial('handlebars', async (t) => {
test('handlebars', async () => {
const bundle = await rollup({
input: 'index.hbs',
plugins: [
@@ -32,7 +31,7 @@ test.serial('handlebars', async (t) => {
});
const code = await getCode(bundle, output);
debugPrintOutput('handlebars',code);
t.snapshot(code);
expect(code).toMatchSnapshot();
});