Skip to content

Commit

Permalink
Fixed the failing unit test. (#50)
Browse files Browse the repository at this point in the history
* Fixed the failing unit test.

* Removed the unreliable assertion
  • Loading branch information
happyhuman authored and alexander-fenster committed Apr 4, 2018
1 parent b5d4480 commit e627e33
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion vision/samples/detect.v1p2beta1.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ function detectPdfText(bucketName, fileName) {
client
.asyncBatchAnnotateFiles(request)
.then(results => {
console.log(results);
const operation = results[0];
// Get a Promise representation of the final result of the job
operation
Expand Down
2 changes: 0 additions & 2 deletions vision/samples/system-test/detect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ test(`should detect crop hints in a remote file`, async t => {
test(`should detect similar web images in a local file`, async t => {
const output = await tools.runAsync(`${cmd} web ${files[5].localPath}`, cwd);
t.true(output.includes('Full matches found:'));
t.true(output.includes('URL: https://cloud.google.com/vision/docs/images/'));
t.true(output.includes('Partial matches found:'));
t.true(output.includes('Web entities found:'));
t.true(output.includes('Description: Google Cloud Platform'));
Expand All @@ -205,7 +204,6 @@ test(`should detect similar web images in a remote file`, async t => {
cwd
);
t.true(output.includes('Full matches found:'));
t.true(output.includes('URL: https://cloud.google.com/vision/docs/images/'));
t.true(output.includes('Partial matches found:'));
t.true(output.includes('Web entities found:'));
t.true(output.includes('Description: Google'));
Expand Down
2 changes: 1 addition & 1 deletion vision/samples/system-test/detect.v1p2beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ test(`should extract text from pdf file`, async t => {
`${cmd} pdf ${bucketName} ${files[0].name}`,
cwd
);
t.true(output.includes('sample.pdf.json'));
t.true(output.includes('pdf-ocr.pdf.json'));
});

0 comments on commit e627e33

Please sign in to comment.