Skip to content

Commit

Permalink
refactor: use explicit mocha imports (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Dec 31, 2019
1 parent 72167ac commit d0a100d
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/browser-test/test.endtoend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

import * as assert from 'assert';
import {describe, it} from 'mocha';
import {expect} from 'chai';
// @ts-ignore
import * as EchoClient from '../fixtures/google-gax-packaging-test-app/src/v1beta1/echo_client';
Expand Down
1 change: 1 addition & 0 deletions test/browser-test/test.grpc-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

import * as assert from 'assert';
import {describe, it} from 'mocha';
import * as protobuf from 'protobufjs';
import * as fallback from '../../src/fallback';
import * as sinon from 'sinon';
Expand Down
1 change: 1 addition & 0 deletions test/browser-test/test.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// Copied from gax-nodejs/system-test/fixtures/google-gax-packaging-test-app/test/gapic-v1beta1.js

import * as assert from 'assert';
import {describe, it} from 'mocha';
import * as through2 from 'through2';
//@ts-ignore
import * as EchoClient from '../fixtures/google-gax-packaging-test-app/src/v1beta1/echo_client';
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/google-gax-packaging-test-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const assert = require('assert');
const {describe, it} = require('mocha');
const grpc = require('@grpc/grpc-js');

// Import the clients for each version supported by this package.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
env:
mocha: true
rules:
node/no-unpublished-require: off
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'use strict';

const assert = require('assert');
const {describe, it} = require('mocha');
const through2 = require('through2');

const showcaseModule = require('../src');
Expand Down
1 change: 1 addition & 0 deletions test/unit/compileProtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/

import * as assert from 'assert';
import {describe, it} from 'mocha';
import * as fs from 'fs';
import * as rimraf from 'rimraf';
import * as util from 'util';
Expand Down
1 change: 1 addition & 0 deletions test/unit/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import * as index from '../../src/index';
import * as fallback from '../../src/fallback';
import * as assert from 'assert';
import {describe, it} from 'mocha';

const version = require('../../../package.json').version;

Expand Down
1 change: 1 addition & 0 deletions test/unit/fallbackError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

import * as assert from 'assert';
import {describe, it} from 'mocha';
import * as fs from 'fs';
import * as path from 'path';
import {FallbackErrorDecoder} from '../../src/fallbackError';
Expand Down
1 change: 1 addition & 0 deletions test/unit/grpc-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

import * as assert from 'assert';
import {describe, it} from 'mocha';
import * as path from 'path';
import * as fs from 'fs';
import * as nodeFetch from 'node-fetch';
Expand Down

0 comments on commit d0a100d

Please sign in to comment.