Skip to content

Commit 6bb9b0f

Browse files
committed
Updated mocha to close automatically
1 parent e2c401c commit 6bb9b0f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"thingssdk": "./bin/thingssdk.js"
88
},
99
"scripts": {
10-
"test": "mocha --recursive",
10+
"test": "mocha --recursive --timeout 5000 --exit",
1111
"combine-coverage": "node ./scripts/coverage_combine",
12-
"test:coverage": "rimraf coverage && istanbul cover --report=none --print=none --include-pid node_modules/mocha/bin/_mocha -- --recursive && npm run combine-coverage"
12+
"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"
1313
},
1414
"repository": {
1515
"type": "git",

test/commands/test-new.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe("thingssdk new", () => {
124124
assert.notEqual(fs.readFileSync(mainPath, "utf-8"), newFileContents);
125125
done();
126126
});
127-
}).timeout(5000);
127+
});
128128

129129
it("should abort if n", done => {
130130
assert.equal(fs.readFileSync(mainPath, "utf-8"), newFileContents);
@@ -138,7 +138,7 @@ describe("thingssdk new", () => {
138138
assert.equal(fs.readFileSync(mainPath, "utf-8"), newFileContents);
139139
done();
140140
});
141-
}).timeout(5000);
141+
});
142142

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

158158
describe("if arguments with tildes in the path are passed", () => {

test/unit/test-ports.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,5 @@ describe("function getPorts()", () => {
7575
assert.isNull(err);
7676
done();
7777
});
78-
}).timeout(4000);
79-
78+
});
8079
});

0 commit comments

Comments
 (0)