From 13ea412c3faba523222e49a3991aee29c1fec3ad Mon Sep 17 00:00:00 2001 From: dapplion Date: Thu, 3 Dec 2020 00:05:49 +0000 Subject: [PATCH] Move web test to a different folder to not run herumi tests twice --- karma.conf.js | 39 +++++++++---------- .../run-web-implementation.test.ts | 6 +-- 2 files changed, 22 insertions(+), 23 deletions(-) rename test/{unit => unit-web}/run-web-implementation.test.ts (76%) diff --git a/karma.conf.js b/karma.conf.js index 1423525..09c45ac 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,26 +1,25 @@ // eslint-disable-next-line @typescript-eslint/no-require-imports const webpackConfig = require("./webpack.config"); -module.exports = function(config) { - config.set({ +module.exports = function (config) { + config.set({ + basePath: "", + frameworks: ["mocha", "chai"], + files: ["test/unit-web/run-web-implementation.test.ts", "test/unit/index-named-exports.test.ts"], + exclude: [], + preprocessors: { + "test/**/*.ts": ["webpack"], + }, + webpack: { + mode: "production", + node: webpackConfig.node, + module: webpackConfig.module, + resolve: webpackConfig.resolve, + }, + reporters: ["spec"], - basePath: "", - frameworks: ["mocha", "chai"], - files: ["test/unit/run-web-implementation.test.ts", "test/unit/index-named-exports.test.ts"], - exclude: [], - preprocessors: { - "test/**/*.ts": ["webpack"] - }, - webpack: { - mode: "production", - node: webpackConfig.node, - module: webpackConfig.module, - resolve: webpackConfig.resolve - }, - reporters: ["spec"], + browsers: ["ChromeHeadless"], - browsers: ["ChromeHeadless"], - - singleRun: true - }); + singleRun: true, + }); }; diff --git a/test/unit/run-web-implementation.test.ts b/test/unit-web/run-web-implementation.test.ts similarity index 76% rename from test/unit/run-web-implementation.test.ts rename to test/unit-web/run-web-implementation.test.ts index 1ef54f0..c1cc7ed 100644 --- a/test/unit/run-web-implementation.test.ts +++ b/test/unit-web/run-web-implementation.test.ts @@ -1,7 +1,7 @@ import herumi from "../../src/herumi"; -import {runSecretKeyTests} from "./secretKey.test"; -import {runPublicKeyTests} from "./publicKey.test"; -import {runIndexTests} from "./index.test"; +import {runSecretKeyTests} from "../unit/secretKey.test"; +import {runPublicKeyTests} from "../unit/publicKey.test"; +import {runIndexTests} from "../unit/index.test"; // This file is intended to be compiled and run by Karma // Do not import the node.bindings or it will break with: