Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions system-test/speech_system_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ describe('SpeechClient system test default', () => {
const stream = client.streamingRecognize(request);
let gotResponse = false;
stream.on('data', response => {
assert.strictEqual(
assert.match(
response.results[0].alternatives[0].transcript,
'test of streaming recognize call'
/test.*call/
);
gotResponse = true;
});
Expand Down
4 changes: 2 additions & 2 deletions system-test/speech_system_test_v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ describe('SpeechClient system test v1', () => {
const stream = client.streamingRecognize(request);
let gotResponse = false;
stream.on('data', response => {
assert.strictEqual(
assert.match(
response.results[0].alternatives[0].transcript,
'test of streaming recognize call'
/test.*call/
);
gotResponse = true;
});
Expand Down
4 changes: 2 additions & 2 deletions system-test/speech_system_test_v1p1beta1.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ describe('SpeechClient system test v1p1beta1', () => {
const stream = client.streamingRecognize(request);
let gotResponse = false;
stream.on('data', response => {
assert.strictEqual(
assert.match(
response.results[0].alternatives[0].transcript,
'test of streaming recognize call'
/test.*call/
);
gotResponse = true;
});
Expand Down
10 changes: 5 additions & 5 deletions system-test/speech_typescript_system_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('SpeechClient TypeScript system test default', () => {
};
const [response] = await client.recognize(request);
assert.strictEqual(
response.results![0].alternatives![0].transcript,
response.results![0].alternatives![0].transcript ?? '',
'hello'
);
});
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('SpeechClient TypeScript system test default', () => {
const [operation] = await client.longRunningRecognize(request);
const [response] = await operation.promise();
assert.strictEqual(
response.results![0].alternatives![0].transcript,
response.results![0].alternatives![0].transcript ?? '',
'hello'
);
});
Expand Down Expand Up @@ -107,9 +107,9 @@ describe('SpeechClient TypeScript system test default', () => {
stream.on(
'data',
(response: google.cloud.speech.v1.IStreamingRecognizeResponse) => {
assert.strictEqual(
response.results![0].alternatives![0].transcript,
'test of streaming recognize call'
assert.match(
response.results![0].alternatives![0].transcript ?? '',
/test.*call/
);
gotResponse = true;
}
Expand Down
8 changes: 4 additions & 4 deletions system-test/speech_typescript_system_test_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('SpeechClient TypeScript system test v1', () => {
const [operation] = await client.longRunningRecognize(request);
const [response] = await operation.promise();
assert.strictEqual(
response.results![0].alternatives![0].transcript,
response.results![0].alternatives![0].transcript ?? '',
'hello'
);
});
Expand Down Expand Up @@ -107,9 +107,9 @@ describe('SpeechClient TypeScript system test v1', () => {
stream.on(
'data',
(response: google.cloud.speech.v1.IStreamingRecognizeResponse) => {
assert.strictEqual(
response.results![0].alternatives![0].transcript,
'test of streaming recognize call'
assert.match(
response.results![0].alternatives![0].transcript ?? '',
/test.*call/
);
gotResponse = true;
}
Expand Down
10 changes: 5 additions & 5 deletions system-test/speech_typescript_system_test_v1p1beta1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('SpeechClient TypeScript system test v1p1beta1', () => {
};
const [response] = await client.recognize(request);
assert.strictEqual(
response.results![0].alternatives![0].transcript,
response.results![0].alternatives![0].transcript ?? '',
'hello'
);
});
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('SpeechClient TypeScript system test v1p1beta1', () => {
const [operation] = await client.longRunningRecognize(request);
const [response] = await operation.promise();
assert.strictEqual(
response.results![0].alternatives![0].transcript,
response.results![0].alternatives![0].transcript ?? '',
'hello'
);
});
Expand Down Expand Up @@ -107,9 +107,9 @@ describe('SpeechClient TypeScript system test v1p1beta1', () => {
stream.on(
'data',
(response: google.cloud.speech.v1p1beta1.IStreamingRecognizeResponse) => {
assert.strictEqual(
response.results![0].alternatives![0].transcript,
'test of streaming recognize call'
assert.match(
response.results![0].alternatives![0].transcript ?? '',
/test.*call/
);
gotResponse = true;
}
Expand Down