Tone.js/test/web-test-runner.config.js
Yotam Mann aaf880c925
Using web-test-runner for tests, updating import paths (#1242)
* WIP moving tests to web-test-runner

* updating thresholds

* Adding file extensions

* Testing integrations

* linting

* fixing dep

* moving back to root dir

* prettier all of the files

* updating eslint rules to use with prettier

* remove import package

* moving tsignore around

* removing unneeded ignores

* all tests run on puppeteer, no need for testing guards

* linting

* import type syntax

* cleaning up

* Update package.json
2024-05-03 14:31:14 -04:00

40 lines
978 B
JavaScript

import { esbuildPlugin } from "@web/dev-server-esbuild";
import { fromRollup } from "@web/dev-server-rollup";
import rollupCommonjs from "@rollup/plugin-commonjs";
import { fileURLToPath } from "url";
import { resolve } from "path";
import { puppeteerLauncher } from "@web/test-runner-puppeteer";
const __dirname = fileURLToPath(new URL(".", import.meta.url));
const commonjs = fromRollup(rollupCommonjs);
export default {
files: ["./build/*/Tone/**/*.test.js", "./build/*/Tone/*.test.js"],
nodeResolve: true,
browsers: [
puppeteerLauncher({
launchOptions: {
headless: true,
args: [
"--no-sandbox",
"--use-fake-ui-for-media-stream",
"--use-fake-device-for-media-stream",
"--autoplay-policy=no-user-gesture-required",
],
},
}),
],
testFramework: {
config: {
timeout: 10000,
retries: 2,
ui: "bdd",
},
},
plugins: [
commonjs({
include: ["**/node_modules/**/*"],
}),
],
rootDir: resolve(__dirname, "../"),
};