diff --git a/package-lock.json b/package-lock.json index ba6772a0..367de555 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "lzg": "^1.0.x", "mocha": "^10.7.3", "mocha-simple-html-reporter": "^2.0.0", + "mocha-suppress-logs": "^0.6.0", "supports-terminal-graphics": "^0.1.0", "typescript": "^5.9.2", "typescript-formatter": "^7.2.2" @@ -5378,6 +5379,26 @@ "node": ">= 10.12.0" } }, + "node_modules/mocha-suppress-logs": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.6.0.tgz", + "integrity": "sha512-cDn7TwkxlcWeXKDYfKrQliGBljTNPKB1/k5doF4TGzAVC/edKGbAM28vsYRTA57h0Y+yaVQbgSmIqYySBNEmfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^2.1.2" + } + }, + "node_modules/mocha-suppress-logs/node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", diff --git a/package.json b/package.json index 45a1d87b..8f014987 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "lzg": "^1.0.x", "mocha": "^10.7.3", "mocha-simple-html-reporter": "^2.0.0", + "mocha-suppress-logs": "^0.6.0", "supports-terminal-graphics": "^0.1.0", "typescript": "^5.9.2", "typescript-formatter": "^7.2.2" @@ -82,10 +83,11 @@ "esbuild-ui": "esbuild src/ide/ui.ts src/ide/embedui.ts --splitting --format=esm --bundle --minify --sourcemap --target=es2017 --outdir=./gen/ --external:path --external:fs", "server": "npm run esbuild-server && rm -fr ./server-root/sessions && node gen/server/server.js", "test-one": "NODE_PATH=$(pwd) mocha --recursive --timeout 60000", - "test-node": "NODE_PATH=$(pwd) mocha --recursive --timeout 60000 test/cli gen/test", + "test-node": "NODE_PATH=$(pwd) mocha --parallel --require mocha-suppress-logs --recursive --timeout 60000 test/cli gen/test", "test-profile": "NODE_PATH=$(pwd) mocha --recursive --timeout 60000 --prof test/cli gen/test", "test-worker": "NODE_PATH=$(pwd) mocha --timeout 60000 test/cli/testworker.js", "test-platforms": "NODE_PATH=$(pwd) mocha --timeout 60000 test/cli/testplatforms.js", + "test-services": "NODE_PATH=$(pwd) mocha --timeout 60000 test/services", "test-verilog": "NODE_PATH=$(pwd) mocha --timeout 60000 --reporter mocha-simple-html-reporter --reporter-options output=test/output/verilog.html test/verilog/testverilog.js", "test-web-quick": "nightwatch -e chrome test/web/testembed.js", "test-web-all": "nightwatch -e chrome test/web", diff --git a/test/cli/testgithub.js b/test/services/testgithub.js similarity index 97% rename from test/cli/testgithub.js rename to test/services/testgithub.js index acb35954..aec44db3 100644 --- a/test/cli/testgithub.js +++ b/test/services/testgithub.js @@ -1,15 +1,10 @@ "use strict"; -// don't run unless Github token exists -if (!process.env.TEST8BIT_GITHUB_TOKEN) { - return; -} - var vm = require('vm'); var fs = require('fs'); var assert = require('assert'); -var wtu = require('./workertestutils.js'); // loads localStorage +var wtu = require('../cli/workertestutils.js'); // loads localStorage var localforage = require("localforage"); var util = require("gen/common/util.js"); var prj = require("gen/ide/project.js");