From d8605ed91d7eaac124cbf868813470393910c172 Mon Sep 17 00:00:00 2001 From: fabioberger Date: Thu, 3 Oct 2019 11:42:19 +0800 Subject: [PATCH] Remove ambient Mocha declaration --- contracts/test-utils/src/mocha_blockchain.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/contracts/test-utils/src/mocha_blockchain.ts b/contracts/test-utils/src/mocha_blockchain.ts index 8c03d147d7..aa13658c7e 100644 --- a/contracts/test-utils/src/mocha_blockchain.ts +++ b/contracts/test-utils/src/mocha_blockchain.ts @@ -3,21 +3,20 @@ import { Web3ProviderEngine } from '@0x/subproviders'; import { providerUtils } from '@0x/utils'; import { TxData, Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; -// Import ambient declarations (and clobber Jest). -import 'mocha'; +import * as mocha from 'mocha'; import * as process from 'process'; import { provider, txDefaults, web3Wrapper } from './web3_wrapper'; // tslint:disable: no-namespace only-arrow-functions no-unbound-method -export type ISuite = Mocha.ISuite; -export type ISuiteCallbackContext = Mocha.ISuiteCallbackContext; +export type ISuite = mocha.ISuite; +export type ISuiteCallbackContext = mocha.ISuiteCallbackContext; export type SuiteCallback = (this: ISuiteCallbackContext) => void; export type ContextDefinitionCallback = (description: string, callback: SuiteCallback) => T; export type BlockchainSuiteCallback = (this: ISuiteCallbackContext, env: BlockchainTestsEnvironment) => void; export type BlockchainContextDefinitionCallback = (description: string, callback: BlockchainSuiteCallback) => T; -export interface ContextDefinition extends Mocha.IContextDefinition { +export interface ContextDefinition extends mocha.IContextDefinition { optional: ContextDefinitionCallback; } @@ -88,10 +87,10 @@ export class BlockchainTestsEnvironmentSingleton { } // The original `describe()` global provided by mocha. -const mochaDescribe = (global as any).describe as Mocha.IContextDefinition; +const mochaDescribe = (global as any).describe as mocha.IContextDefinition; /** - * An augmented version of Mocha's `describe()`. + * An augmented version of mocha's `describe()`. */ export const describe = _.assign(mochaDescribe, { optional(description: string, callback: SuiteCallback): ISuite | void {