Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
refactor: use explicit mocha imports (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and bcoe committed Dec 30, 2019
1 parent 3a56d18 commit fcf1bb6
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 13 deletions.
3 changes: 0 additions & 3 deletions samples/test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
---
env:
mocha: true

1 change: 1 addition & 0 deletions samples/test/audioProfile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

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

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
1 change: 1 addition & 0 deletions samples/test/listVoices.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
3 changes: 2 additions & 1 deletion samples/test/quickstart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

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

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand All @@ -31,7 +32,7 @@ describe('quickstart', () => {
}
});

it('should synthesize speech to local mp3 file', async () => {
it('should synthesize speech to local mp3 file', () => {
assert.strictEqual(fs.existsSync(outputFile), false);
const stdout = execSync('node quickstart');
assert.match(stdout, /Audio content written to file: output.mp3/);
Expand Down
1 change: 1 addition & 0 deletions samples/test/ssmlAddresses.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

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

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
1 change: 1 addition & 0 deletions samples/test/synthesize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
const fs = require('fs');
const path = require('path');
const {assert} = require('chai');
const {describe, it, afterEach} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
Expand Down
2 changes: 0 additions & 2 deletions smoke-test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
env:
mocha: true
rules:
no-console: off
4 changes: 0 additions & 4 deletions system-test/.eslintrc.yml

This file was deleted.

3 changes: 0 additions & 3 deletions test/.eslintrc.yml

This file was deleted.

1 change: 1 addition & 0 deletions test/gapic-text_to_speech-v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import * as protosTypes from '../protos/protos';
import * as assert from 'assert';
import {describe, it} from 'mocha';
const texttospeechModule = require('../src');

const FAKE_STATUS_CODE = 1;
Expand Down
1 change: 1 addition & 0 deletions test/gapic-text_to_speech-v1beta1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import * as protosTypes from '../protos/protos';
import * as assert from 'assert';
import {describe, it} from 'mocha';
const texttospeechModule = require('../src');

const FAKE_STATUS_CODE = 1;
Expand Down

0 comments on commit fcf1bb6

Please sign in to comment.