Skip to content

Commit

Permalink
Updated mocha to close automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
chalkers committed Apr 9, 2018
1 parent e2c401c commit 6bb9b0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"thingssdk": "./bin/thingssdk.js"
},
"scripts": {
"test": "mocha --recursive",
"test": "mocha --recursive --timeout 5000 --exit",
"combine-coverage": "node ./scripts/coverage_combine",
"test:coverage": "rimraf coverage && istanbul cover --report=none --print=none --include-pid node_modules/mocha/bin/_mocha -- --recursive && npm run combine-coverage"
"test:coverage": "rimraf coverage && istanbul cover --report=none --print=none --include-pid node_modules/mocha/bin/_mocha -- --recursive --timeout 5000 --exit && npm run combine-coverage"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions test/commands/test-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe("thingssdk new", () => {
assert.notEqual(fs.readFileSync(mainPath, "utf-8"), newFileContents);
done();
});
}).timeout(5000);
});

it("should abort if n", done => {
assert.equal(fs.readFileSync(mainPath, "utf-8"), newFileContents);
Expand All @@ -138,7 +138,7 @@ describe("thingssdk new", () => {
assert.equal(fs.readFileSync(mainPath, "utf-8"), newFileContents);
done();
});
}).timeout(5000);
});

it("should abort and error if y or n not pressent", done => {
assert.equal(fs.readFileSync(mainPath, "utf-8"), newFileContents);
Expand All @@ -152,7 +152,7 @@ describe("thingssdk new", () => {
assert.equal(fs.readFileSync(mainPath, "utf-8"), newFileContents);
done();
});
}).timeout(5000);
});
});

describe("if arguments with tildes in the path are passed", () => {
Expand Down
3 changes: 1 addition & 2 deletions test/unit/test-ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ describe("function getPorts()", () => {
assert.isNull(err);
done();
});
}).timeout(4000);

});
});

0 comments on commit 6bb9b0f

Please sign in to comment.