Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit a6f825e

Browse files
JustinBeckwithkjin
authored andcommitted
refactor: use explicit mocha imports (#1175)
Co-authored-by: Kelvin Jin <kelvinjin@google.com>
1 parent 21dbb0d commit a6f825e

32 files changed

Lines changed: 32 additions & 0 deletions

system-test/trace-express.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const tracer = require('../').start({
4444
require('hard-rejection')();
4545

4646
const assert = require('assert');
47+
const {describe, it} = require('mocha');
4748
const googleAuth = require('google-auto-auth');
4849
const got = require('got');
4950
const queryString = require('querystring');

test/plugins/test-cls-bluebird.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as assert from 'assert';
16+
import {describe, it} from 'mocha';
1617

1718
import {bluebird_3 as BluebirdPromise} from '../../src/plugins/types';
1819
import {Trace} from '../../src/trace';

test/plugins/test-trace-google-gax.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
*/
3535

3636
import * as assert from 'assert';
37+
import {describe, it} from 'mocha';
3738

3839
import * as testTraceModule from '../trace';
3940
import {describeInterop} from '../utils';

test/plugins/test-trace-grpc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { TraceLabels } from '../../src/trace-labels';
1919
import * as TracingPolicy from '../../src/tracing-policy';
2020
import * as util from '../../src/util';
2121
import * as assert from 'assert';
22+
import {describe, it} from 'mocha';
2223
import { asRootSpanData, describeInterop, DEFAULT_SPAN_DURATION, assertSpanDuration } from '../utils';
2324
import { Span } from '../../src/plugin-types';
2425
import { FORCE_NEW } from '../../src/util';

test/plugins/test-trace-http.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as assert from 'assert';
16+
import {describe, it} from 'mocha';
1617
import {EventEmitter} from 'events';
1718
import * as httpModule from 'http';
1819
import * as httpsModule from 'https';

test/plugins/test-trace-http2.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as assert from 'assert';
16+
import {describe, it} from 'mocha';
1617
// This is imported only for types. Generated .js file should NOT load 'http2'
1718
// in this place. It is dynamically loaded later from each test suite below.
1819
import * as http2Types from 'http2';

test/plugins/test-trace-knex.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as assert from 'assert';
16+
import {describe, it} from 'mocha';
1617
import * as knexTypes from 'knex';
1718

1819
import {Tracer} from '../../src/plugin-types';

test/plugins/test-trace-mongoose-async-await.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as assert from 'assert';
16+
import {describe, it} from 'mocha';
1617
import * as mongooseTypes from 'mongoose';
1718

1819
import * as traceTestModule from '../trace';

test/plugins/test-trace-node-fetch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import * as fetchTypes from 'node-fetch'; // For types only.
1616
import * as testTraceModule from '../trace';
1717
import * as assert from 'assert';
18+
import {describe, it} from 'mocha';
1819
import {describeInterop} from '../utils';
1920
import {Express4} from '../web-frameworks/express';
2021
import {Express4Secure} from '../web-frameworks/express-secure';

test/test-agent-stopped.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
import * as assert from 'assert';
16+
import {describe, it} from 'mocha';
1617
import * as http from 'http';
1718
import * as traceTestModule from './trace';
1819
import { pluginLoader, PluginLoaderState } from '../src/trace-plugin-loader';

0 commit comments

Comments
 (0)