mirror of https://github.com/grpc/grpc-node.git
Add dev-dependencies and fix tests so they exit after running
This commit is contained in:
parent
692ba8387c
commit
110461d78a
|
|
@ -42,7 +42,7 @@
|
||||||
"through2": "^2.0.3",
|
"through2": "^2.0.3",
|
||||||
"ts-node": "^8.1.0",
|
"ts-node": "^8.1.0",
|
||||||
"tslint": "^5.5.0",
|
"tslint": "^5.5.0",
|
||||||
"typescript": "~3.3.3333",
|
"typescript": "^3.5.3",
|
||||||
"xml2js": "^0.4.19"
|
"xml2js": "^0.4.19"
|
||||||
},
|
},
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,25 @@
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@grpc/proto-loader": "^0.5.0",
|
"@grpc/proto-loader": "^0.5.0",
|
||||||
|
"@types/gulp": "^4.0.6",
|
||||||
|
"@types/gulp-mocha": "0.0.32",
|
||||||
"@types/lodash": "^4.14.108",
|
"@types/lodash": "^4.14.108",
|
||||||
"@types/mocha": "^5.2.6",
|
"@types/mocha": "^5.2.6",
|
||||||
|
"@types/ncp": "^2.0.1",
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^12.0.2",
|
||||||
|
"@types/pify": "^3.0.2",
|
||||||
"@types/semver": "^6.0.1",
|
"@types/semver": "^6.0.1",
|
||||||
"clang-format": "^1.0.55",
|
"clang-format": "^1.0.55",
|
||||||
|
"execa": "^2.0.3",
|
||||||
"gts": "^1.0.0",
|
"gts": "^1.0.0",
|
||||||
|
"gulp": "^4.0.2",
|
||||||
|
"gulp-mocha": "^6.0.0",
|
||||||
"lodash": "^4.17.4",
|
"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": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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();
|
const server = new Server();
|
||||||
|
|
||||||
server.bindAsync(
|
server.bindAsync(
|
||||||
|
|
@ -102,6 +102,7 @@ describe('Server', () => {
|
||||||
noop
|
noop
|
||||||
);
|
);
|
||||||
}, /server is already started/);
|
}, /server is already started/);
|
||||||
|
server.tryShutdown(done);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
@ -243,7 +244,7 @@ describe('Server', () => {
|
||||||
const mathClient = (loadProtoFile(mathProtoFile).math as any).Math;
|
const mathClient = (loadProtoFile(mathProtoFile).math as any).Math;
|
||||||
const mathServiceAttrs = mathClient.service;
|
const mathServiceAttrs = mathClient.service;
|
||||||
|
|
||||||
beforeEach(done => {
|
before(done => {
|
||||||
server = new Server();
|
server = new Server();
|
||||||
server.addService(mathServiceAttrs, {});
|
server.addService(mathServiceAttrs, {});
|
||||||
server.bindAsync(
|
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 => {
|
it('should respond to a unary call with UNIMPLEMENTED', done => {
|
||||||
client.div(
|
client.div(
|
||||||
{ divisor: 4, dividend: 3 },
|
{ divisor: 4, dividend: 3 },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue