Skip to content

Commit

Permalink
refactor: use explicit mocha imports
Browse files Browse the repository at this point in the history
* refactor: use explicit mocha imports

* fixy
  • Loading branch information
JustinBeckwith authored and Ace Nassri committed Nov 15, 2022
1 parent 6438d03 commit 1d69fd0
Show file tree
Hide file tree
Showing 33 changed files with 32 additions and 2 deletions.
2 changes: 0 additions & 2 deletions automl/test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
rules:
no-warning-comments: off
env:
mocha: true
1 change: 1 addition & 0 deletions automl/test/automlLangaugeSentimentDataSet.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Natural Language Sentiment Analysis "Dataset API" sample.*/
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlLanguageEntityDataSet.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Natural Language Entity Extraction - Dataset Operations */
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlLanguageEntityModel.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Natural Language Entity Extraction "Model API" sample. */
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlLanguageEntityPrediction.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Natural Language Entity Extraction "Prediction API" sample.
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlLanguageSentimentModel.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Natural Language Sentiment Analysis "Model API" sample. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Natural Language Sentiment Analysis "Prediction API"
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlTablesDataset.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Tables "Dataset API" sample. */
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlTablesModel.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Tables "Model API" sample. */
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlTablesPredict.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Tables "Prediction API" sample. */
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlTranslation.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Video Intelligence Classification "Dataset API" sample. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Video Intelligence Classification "Model API" sample. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Video Intelligence Classification "Prediction API" sample.
Expand Down
1 change: 1 addition & 0 deletions automl/test/automlVision.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

const path = require('path');
const {assert} = require('chai');
const {describe, it} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

/** Tests for AutoML Vision Object Detection "Prediction API" sample. */
Expand Down
1 change: 1 addition & 0 deletions automl/test/delete_dataset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, before} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/export_dataset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;
const {Storage} = require('@google-cloud/storage');

Expand Down
1 change: 1 addition & 0 deletions automl/test/get_dataset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/import_dataset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, before, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/language_entity_extraction_predict.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, before} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/language_sentiment_analysis_predict.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, before} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/list_datasets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/setEndpoint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const cp = require('child_process');

const projectId = process.env.GCLOUD_PROJECT;
Expand Down
1 change: 1 addition & 0 deletions automl/test/translate_create_dataset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/translate_create_model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it, after} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down
1 change: 1 addition & 0 deletions automl/test/translate_predict.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const {assert} = require('chai');
const {describe, it} = require('mocha');
const {AutoMlClient} = require('@google-cloud/automl').v1;

const cp = require('child_process');
Expand Down

0 comments on commit 1d69fd0

Please sign in to comment.