Skip to content

Commit 938aeee

Browse files
JustinBeckwithBenjamin E. Coe
authored andcommitted
refactor: use explicit mocha imports (#505)
1 parent 3de2ae4 commit 938aeee

19 files changed

+23
-13
lines changed

vision/samples/.eslintrc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
---
22
rules:
33
no-console: off
4-
node/no-missing-require: off

vision/samples/setEndpoint.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ async function setEndpoint() {
2626
const client = new vision.ImageAnnotatorClient(clientOptions);
2727
// [END vision_set_endpoint]
2828

29-
// Performs label detection on the image file
30-
const [result] = await client.labelDetection('./resources/wakeupcat.jpg');
31-
const labels = result.labelAnnotations;
32-
console.log('Labels:');
29+
// Performs text detection on the image file
30+
const [result] = await client.textDetection('./resources/wakeupcat.jpg');
31+
const labels = result.textAnnotations;
32+
console.log('Text:');
3333
labels.forEach(label => console.log(label.description));
3434
}
3535

vision/samples/system-test/.eslintrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

vision/samples/system-test/async-batch-annotate-images.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const path = require('path');
1818
const {Storage} = require('@google-cloud/storage');
1919
const cp = require('child_process');
2020
const {assert} = require('chai');
21+
const {describe, it, before, after} = require('mocha');
2122
const uuid = require('uuid');
2223

2324
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

vision/samples/system-test/batch-annotate-files-gcs.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const path = require('path');
1818
const {Storage} = require('@google-cloud/storage');
1919
const cp = require('child_process');
2020
const {assert} = require('chai');
21+
const {describe, it, before, after} = require('mocha');
2122
const uuid = require('uuid');
2223

2324
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

vision/samples/system-test/batch-annotate-files.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const path = require('path');
1818
const {Storage} = require('@google-cloud/storage');
1919
const cp = require('child_process');
2020
const {assert} = require('chai');
21+
const {describe, it, before, after} = require('mocha');
2122
const uuid = require('uuid');
2223

2324
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

vision/samples/system-test/detect.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const {Storage} = require('@google-cloud/storage');
1919
const cp = require('child_process');
2020
const uuid = require('uuid');
2121
const {assert} = require('chai');
22+
const {describe, it, before, after} = require('mocha');
2223
const vision = require('@google-cloud/vision');
2324

2425
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

vision/samples/system-test/detect.v1p1beta1.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
const path = require('path');
1818
const cp = require('child_process');
1919
const {assert} = require('chai');
20+
const {describe, it} = require('mocha');
2021

2122
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2223

vision/samples/system-test/detect.v1p3beta1.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const path = require('path');
1818
const {Storage} = require('@google-cloud/storage');
1919
const cp = require('child_process');
2020
const {assert} = require('chai');
21+
const {describe, it, before, after} = require('mocha');
2122
const uuid = require('uuid');
2223

2324
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

vision/samples/system-test/faceDetection.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
const path = require('path');
1818
const {assert} = require('chai');
19+
const {describe, it} = require('mocha');
1920
const cp = require('child_process');
2021

2122
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});

0 commit comments

Comments
 (0)