Fixes for PR #3313 review

This commit is contained in:
Jason Tremper
2014-12-18 07:46:43 -05:00
parent 2229f4ca12
commit 3a022a9a64
3 changed files with 47 additions and 52 deletions
+22 -22
View File
@@ -1,5 +1,5 @@
// Type definitions for mocha 2.0.1
// Project: http://visionmedia.github.io/mocha/
// Project: http://mochajs.org/
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -111,7 +111,7 @@ declare function suiteTeardown(action: (done: MochaDone) => void): void;
declare module "mocha" {
class MochaInstance {
class Mocha {
constructor(options?: {
grep?: RegExp;
ui?: string;
@@ -120,28 +120,28 @@ declare module "mocha" {
bail?: boolean;
});
bail(value?: boolean): MochaInstance;
addFile(file: string): MochaInstance;
reporter(value: string): MochaInstance;
ui(value: string): MochaInstance;
grep(value: string): MochaInstance;
grep(value: RegExp): MochaInstance;
invert(): MochaInstance;
ignoreLeaks(value: boolean): MochaInstance;
checkLeaks(): MochaInstance;
growl(): MochaInstance;
globals(value: string): MochaInstance;
globals(values: string[]): MochaInstance;
useColors(value: boolean): MochaInstance;
useInlineDiffs(value: boolean): MochaInstance;
timeout(value: number): MochaInstance;
slow(value: number): MochaInstance;
enableTimeouts(value: boolean): MochaInstance;
asyncOnly(value: boolean): MochaInstance;
noHighlighting(value: boolean): MochaInstance;
bail(value?: boolean): Mocha;
addFile(file: string): Mocha;
reporter(value: string): Mocha;
ui(value: string): Mocha;
grep(value: string): Mocha;
grep(value: RegExp): Mocha;
invert(): Mocha;
ignoreLeaks(value: boolean): Mocha;
checkLeaks(): Mocha;
growl(): Mocha;
globals(value: string): Mocha;
globals(values: string[]): Mocha;
useColors(value: boolean): Mocha;
useInlineDiffs(value: boolean): Mocha;
timeout(value: number): Mocha;
slow(value: number): Mocha;
enableTimeouts(value: boolean): Mocha;
asyncOnly(value: boolean): Mocha;
noHighlighting(value: boolean): Mocha;
run(onComplete?: (failures: number) => void): void;
}
export = MochaInstance;
export = Mocha;
}
+23 -28
View File
@@ -5,34 +5,29 @@
declare module "mockery" {
module m {
interface MockeryEnableArgs {
useCleanCache?: boolean;
warnOnReplace?: boolean;
warnOnUnregistered?: boolean;
}
function enable(args?: MockeryEnableArgs): void;
function disable(): void;
function registerMock(name: string, mock: any): void;
function deregisterMock(name: string): void;
function registerSubstitute(name: string, substitute: string): void;
function deregisterSubstitute(name: string): void;
function registerAllowable(name: string, unhook?: boolean): void;
function deregisterAllowable(name: string): void;
function registerAllowables(names: string[]): void;
function deregisterAllowables(names: string[]): void;
function deregisterAll(): void;
function resetCache(): void;
function warnOnUnregistered(value: boolean): void;
function warnOnReplace(value: boolean): void;
interface MockeryEnableArgs {
useCleanCache?: boolean;
warnOnReplace?: boolean;
warnOnUnregistered?: boolean;
}
export = m;
export function enable(args?: MockeryEnableArgs): void;
export function disable(): void;
export function registerMock(name: string, mock: any): void;
export function deregisterMock(name: string): void;
export function registerSubstitute(name: string, substitute: string): void;
export function deregisterSubstitute(name: string): void;
export function registerAllowable(name: string, unhook?: boolean): void;
export function deregisterAllowable(name: string): void;
export function registerAllowables(names: string[]): void;
export function deregisterAllowables(names: string[]): void;
export function deregisterAll(): void;
export function resetCache(): void;
export function warnOnUnregistered(value: boolean): void;
export function warnOnReplace(value: boolean): void;
}
+2 -2
View File
@@ -8,7 +8,7 @@
declare module "multer" {
import express = require('express');
function Multer(options?: any): express.RequestHandler;
function multer(options?: any): express.RequestHandler;
export = Multer;
export = multer;
}