From 535eef02c99fb700c606af79eedb694ae9a51fa8 Mon Sep 17 00:00:00 2001 From: Sasha Date: Wed, 28 Feb 2024 01:02:19 +0100 Subject: [PATCH] try --- karma.conf.cjs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/karma.conf.cjs b/karma.conf.cjs index e241a29..7a41f99 100644 --- a/karma.conf.cjs +++ b/karma.conf.cjs @@ -1,17 +1,9 @@ const webpack = require("webpack"); const playwright = require('playwright'); -const os = require("os"); -const path = require("path"); process.env.CHROME_BIN = playwright.chromium.executablePath(); process.env.FIREFOX_BIN = playwright.firefox.executablePath(); -const output = { - path: - path.join(os.tmpdir(), "_karma_webpack_") + - Math.floor(Math.random() * 1000000), -}; - module.exports = function (config) { config.set({ frameworks: ["webpack", "mocha"], @@ -23,12 +15,11 @@ module.exports = function (config) { files: [ "src/**/!(node).spec.ts", { - pattern: `${output.path}/**/*`, + pattern: `dist/**/*`, watched: false, included: false, served: true, }, - { pattern: 'bundle/**/*.wasm', included: false, served: true, type: 'wasm' } ], preprocessors: { "src/**/!(node).spec.ts": ["webpack"] @@ -48,9 +39,11 @@ module.exports = function (config) { rules: [{ test: /\.wasm$/, type: "asset/resource", - }, { test: /\.([cm]?ts|tsx)$/, loader: "ts-loader" }] + }, { + test: /\.([cm]?ts|tsx)$/, + loader: "ts-loader" + }] }, - output, plugins: [ new webpack.DefinePlugin({ "process.env.CI": process.env.CI || false,