Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Init mock request for server/bidi streaming method in test #313

Merged
merged 10 commits into from
Mar 2, 2020
2 changes: 1 addition & 1 deletion baselines/dlp/package.json.baseline
2 changes: 1 addition & 1 deletion baselines/kms/package.json.baseline
2 changes: 1 addition & 1 deletion baselines/monitoring/package.json.baseline
2 changes: 1 addition & 1 deletion baselines/redis/package.json.baseline
2 changes: 1 addition & 1 deletion baselines/showcase/package.json.baseline
8 changes: 4 additions & 4 deletions baselines/showcase/test/gapic-echo-v1beta1.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe('v1beta1.EchoClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IExpandRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -305,7 +305,7 @@ describe('v1beta1.EchoClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IExpandRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -329,7 +329,7 @@ describe('v1beta1.EchoClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -348,7 +348,7 @@ describe('v1beta1.EchoClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IEchoRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand Down
10 changes: 6 additions & 4 deletions baselines/showcase/test/gapic-messaging-v1beta1.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,8 @@ describe('v1beta1.MessagingClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IStreamBlurbsRequest = {};
request.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -601,7 +602,8 @@ describe('v1beta1.MessagingClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IStreamBlurbsRequest = {};
request.name = '';
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -625,7 +627,7 @@ describe('v1beta1.MessagingClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IConnectRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -644,7 +646,7 @@ describe('v1beta1.MessagingClient', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
const request: protosTypes.google.showcase.v1beta1.IConnectRequest = {};
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand Down
2 changes: 1 addition & 1 deletion baselines/texttospeech/package.json.baseline
2 changes: 1 addition & 1 deletion baselines/translate/package.json.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
{{ util.initRequestWithHeaderParam(method) }}
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -275,7 +275,7 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
{{ util.initRequestWithHeaderParam(method) }}
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -301,7 +301,7 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
{{ util.initRequestWithHeaderParam(method) }}
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand All @@ -320,7 +320,7 @@ describe('{{ api.naming.version }}.{{ service.name }}Client', () => {
projectId: 'bogus',
});
// Mock request
const request = {};
{{ util.initRequestWithHeaderParam(method) }}
// Mock response
const expectedResponse = {};
// Mock gRPC layer
Expand Down