chore: switch to jest for testing
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import {join, dirname} from "node:path";
|
||||
|
||||
import test from "ava";
|
||||
import {test, expect, jest} from "@jest/globals";
|
||||
|
||||
// Rollup * plugins
|
||||
import { rollup } from "rollup";
|
||||
@@ -27,7 +26,9 @@ const defaultAssetInclude = [
|
||||
'**/*.(webm|mp4)',// video
|
||||
];
|
||||
|
||||
test.serial('web-bundle', async (t) => {
|
||||
|
||||
jest.setTimeout(30*1000);// Bundling react + typescript is getting heavy
|
||||
test('web-bundle', async () => {
|
||||
const out = await runBrowserTest({
|
||||
input: 'index.hbs',
|
||||
treeshake: 'smallest',
|
||||
@@ -67,8 +68,7 @@ test.serial('web-bundle', async (t) => {
|
||||
}),
|
||||
],
|
||||
}, {
|
||||
path: 'index.html',
|
||||
log: t.log,
|
||||
path: 'index.html'
|
||||
},{
|
||||
dir: 'output', // Output all files
|
||||
format: 'es', // iifi and cjs should be added to tests
|
||||
@@ -77,7 +77,7 @@ test.serial('web-bundle', async (t) => {
|
||||
entryFileNames: '[name].[extname]',
|
||||
assetFileNames: '[name].[extname]',
|
||||
});
|
||||
t.snapshot(out);
|
||||
expect(out).toMatchSnapshot();
|
||||
|
||||
// const code = await getCode(bundle, output);
|
||||
// debugPrintOutput('jsx-web-app',code);
|
||||
|
||||
Reference in New Issue
Block a user