diff --git a/lib/factorioServer/index.spec.js b/lib/factorioServer/index.spec.js index 1caf2afb..ce62386f 100644 --- a/lib/factorioServer/index.spec.js +++ b/lib/factorioServer/index.spec.js @@ -73,6 +73,7 @@ describe("class factorioServer/index.js", ()=>{ }); describe(".createMap(mapName.zip)", ()=>{ it("creates a map file as instanceDirectory/saves/map.zip", async function(){ + /* istanbul ignore if */ if (process.env.FAST_TEST) this.skip(); this.timeout(20000); // these test often takes a lot of time in the map creation step (4500 ms on i3 dev system) let relativePath = path.relative('.', __dirname); let server = new factorioServer({ @@ -91,6 +92,7 @@ describe("class factorioServer/index.js", ()=>{ return true; }); it("supports custom filenames", async function(){ + /* istanbul igoner if */ if (process.env.FAST_TEST) this.skip(); this.timeout(20000); let relativePath = path.relative('.', __dirname); let server = new factorioServer({ diff --git a/lib/generateSSLcert.spec.js b/lib/generateSSLcert.spec.js index b8e9306d..6f69efae 100644 --- a/lib/generateSSLcert.spec.js +++ b/lib/generateSSLcert.spec.js @@ -6,6 +6,7 @@ var generateSSLcert = require("lib/generateSSLcert.js") describe("generateSSLcert.js(options)", ()=>{ it("Creates a folder with a .crt and .key file in it", async function() { + /* istanbul ignore if */ if (process.env.FAST_TEST) this.skip(); let certPath = "lib/certTestPlsDelete/cert.crt"; let privKeyPath = "lib/certTestPlsDelete/cert.key"; assert(!await fs.exists(certPath)); // if it already exsits, the test might pass because of leftover data (which is bad) diff --git a/package.json b/package.json index 118ca713..c53760a2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,9 @@ "main": "master.js", "scripts": { "test": "mocha --exit --check-leaks -R spec \"./{,!(node_modules)/**/}*.spec.js\" || true", + "fast-test": "FAST_TEST=y mocha --check-leaks --exit -R spec \"./{,!(node_modules)/**/}*.spec.js\" || true", "cover": "nyc npm run-script test", + "fast-cover": "nyc npm run-script fast-test", "ci-cover": "nyc --reporter=lcovonly npm run-script test", "start": "echo Run node client.js start [instance] to start slaves && node master.js", "install": "node lib/npmPostinstall.js",