Add dev-dependencies and fix tests so they exit after running

This commit is contained in:
Bjorn Stromberg 2019-07-17 10:30:39 +09:00
parent 692ba8387c
commit 110461d78a
3 changed files with 21 additions and 4 deletions

View File

@ -42,7 +42,7 @@
"through2": "^2.0.3",
"ts-node": "^8.1.0",
"tslint": "^5.5.0",
"typescript": "~3.3.3333",
"typescript": "^3.5.3",
"xml2js": "^0.4.19"
},
"contributors": [

View File

@ -16,14 +16,25 @@
"license": "Apache-2.0",
"devDependencies": {
"@grpc/proto-loader": "^0.5.0",
"@types/gulp": "^4.0.6",
"@types/gulp-mocha": "0.0.32",
"@types/lodash": "^4.14.108",
"@types/mocha": "^5.2.6",
"@types/ncp": "^2.0.1",
"@types/node": "^12.0.2",
"@types/pify": "^3.0.2",
"@types/semver": "^6.0.1",
"clang-format": "^1.0.55",
"execa": "^2.0.3",
"gts": "^1.0.0",
"gulp": "^4.0.2",
"gulp-mocha": "^6.0.0",
"lodash": "^4.17.4",
"typescript": "~3.5.1"
"mocha-jenkins-reporter": "^0.4.1",
"ncp": "^2.0.0",
"pify": "^4.0.1",
"ts-node": "^8.3.0",
"typescript": "^3.5.3"
},
"contributors": [
{

View File

@ -86,7 +86,7 @@ describe('Server', () => {
});
});
it('throws if bind is called after the server is started', () => {
it('throws if bind is called after the server is started', done => {
const server = new Server();
server.bindAsync(
@ -102,6 +102,7 @@ describe('Server', () => {
noop
);
}, /server is already started/);
server.tryShutdown(done);
}
);
});
@ -243,7 +244,7 @@ describe('Server', () => {
const mathClient = (loadProtoFile(mathProtoFile).math as any).Math;
const mathServiceAttrs = mathClient.service;
beforeEach(done => {
before(done => {
server = new Server();
server.addService(mathServiceAttrs, {});
server.bindAsync(
@ -261,6 +262,11 @@ describe('Server', () => {
);
});
after(done => {
client.close();
server.tryShutdown(done);
});
it('should respond to a unary call with UNIMPLEMENTED', done => {
client.div(
{ divisor: 4, dividend: 3 },