@types/mocha
Advanced tools
Comparing version 2.2.33 to 2.2.34
@@ -52,19 +52,15 @@ // Type definitions for mocha 2.2.5 | ||
interface ActionFunction { | ||
(done: MochaDone): any | PromiseLike<any> | ||
} | ||
declare function setup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function teardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function suiteSetup(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function suiteTeardown(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function before(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function before(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function after(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function after(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function beforeEach(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function beforeEach(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function afterEach(callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function afterEach(description: string, callback: (this: Mocha.IHookCallbackContext, done: MochaDone) => any): void; | ||
declare function setup(action: ActionFunction): void; | ||
declare function teardown(action: ActionFunction): void; | ||
declare function suiteSetup(action: ActionFunction): void; | ||
declare function suiteTeardown(action: ActionFunction): void; | ||
declare function before(action: ActionFunction): void; | ||
declare function before(description: string, action: ActionFunction): void; | ||
declare function after(action: ActionFunction): void; | ||
declare function after(description: string, action: ActionFunction): void; | ||
declare function beforeEach(action: ActionFunction): void; | ||
declare function beforeEach(description: string, action: ActionFunction): void; | ||
declare function afterEach(action: ActionFunction): void; | ||
declare function afterEach(description: string, action: ActionFunction): void; | ||
declare class Mocha { | ||
@@ -117,2 +113,20 @@ currentTest: Mocha.ITestDefinition; | ||
declare namespace Mocha { | ||
interface ISuiteCallbackContext { | ||
timeout(ms: number): void; | ||
retries(n: number): void; | ||
slow(ms: number): void; | ||
} | ||
interface IHookCallbackContext { | ||
skip(): void; | ||
timeout(ms: number): void; | ||
} | ||
interface ITestCallbackContext { | ||
skip(): void; | ||
timeout(ms: number): void; | ||
retries(n: number): void; | ||
slow(ms: number): void; | ||
} | ||
/** Partial interface for Mocha's `Runnable` class. */ | ||
@@ -144,8 +158,8 @@ interface IRunnable { | ||
/** Partial interface for Mocha's `Runner` class. */ | ||
interface IRunner {} | ||
interface IRunner { } | ||
interface IContextDefinition { | ||
(description: string, spec: () => void): ISuite; | ||
only(description: string, spec: () => void): ISuite; | ||
skip(description: string, spec: () => void): void; | ||
(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; | ||
only(description: string, callback: (this: ISuiteCallbackContext) => void): ISuite; | ||
skip(description: string, callback: (this: ISuiteCallbackContext) => void): void; | ||
timeout(ms: number): void; | ||
@@ -155,5 +169,5 @@ } | ||
interface ITestDefinition { | ||
(expectation: string, assertion?: ActionFunction): ITest; | ||
only(expectation: string, assertion?: ActionFunction): ITest; | ||
skip(expectation: string, assertion?: ActionFunction): void; | ||
(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest; | ||
only(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): ITest; | ||
skip(expectation: string, callback?: (this: ITestCallbackContext, done: MochaDone) => any): void; | ||
timeout(ms: number): void; | ||
@@ -176,14 +190,14 @@ state: "failed" | "passed"; | ||
export class Doc extends Base {} | ||
export class Dot extends Base {} | ||
export class HTML extends Base {} | ||
export class HTMLCov extends Base {} | ||
export class JSON extends Base {} | ||
export class JSONCov extends Base {} | ||
export class JSONStream extends Base {} | ||
export class Landing extends Base {} | ||
export class List extends Base {} | ||
export class Markdown extends Base {} | ||
export class Min extends Base {} | ||
export class Nyan extends Base {} | ||
export class Doc extends Base { } | ||
export class Dot extends Base { } | ||
export class HTML extends Base { } | ||
export class HTMLCov extends Base { } | ||
export class JSON extends Base { } | ||
export class JSONCov extends Base { } | ||
export class JSONStream extends Base { } | ||
export class Landing extends Base { } | ||
export class List extends Base { } | ||
export class Markdown extends Base { } | ||
export class Min extends Base { } | ||
export class Nyan extends Base { } | ||
export class Progress extends Base { | ||
@@ -203,4 +217,4 @@ /** | ||
} | ||
export class Spec extends Base {} | ||
export class TAP extends Base {} | ||
export class Spec extends Base { } | ||
export class TAP extends Base { } | ||
export class XUnit extends Base { | ||
@@ -207,0 +221,0 @@ constructor(runner: IRunner, options?: any); |
{ | ||
"name": "@types/mocha", | ||
"version": "2.2.33", | ||
"description": "TypeScript definitions for mocha 2.2.5", | ||
"version": "2.2.34", | ||
"description": "TypeScript definitions for mocha", | ||
"license": "MIT", | ||
@@ -15,4 +15,3 @@ "author": "Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>, Vadim Macagon <https://github.com/enlight>", | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "781be81f667ad5dfc5a317c96c9192a944f459427b446063fc6810c335964f04" | ||
"typesPublisherContentHash": "9ab020a6fa3d8772c17b20960f90ef2af5bc6ec9d442c4d76bc8378129565001" | ||
} |
@@ -5,10 +5,9 @@ # Installation | ||
# Summary | ||
This package contains type definitions for mocha 2.2.5 (http://mochajs.org/). | ||
This package contains type definitions for mocha (http://mochajs.org/). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/mocha | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/mocha | ||
Additional Details | ||
* Last updated: Mon, 14 Nov 2016 19:34:57 GMT | ||
* File structure: Mixed | ||
* Last updated: Tue, 20 Dec 2016 12:10:44 GMT | ||
* Library Dependencies: none | ||
@@ -15,0 +14,0 @@ * Module Dependencies: none |
{ | ||
"authors": "Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, otiai10 <https://github.com/otiai10>, jt000 <https://github.com/jt000>, Vadim Macagon <https://github.com/enlight>", | ||
"definitionFilename": "index.d.ts", | ||
"libraryDependencies": [], | ||
@@ -8,8 +7,7 @@ "moduleDependencies": [], | ||
"libraryMinorVersion": 2, | ||
"libraryName": "mocha 2.2.5", | ||
"libraryName": "mocha", | ||
"typingsPackageName": "mocha", | ||
"projectName": "http://mochajs.org/", | ||
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
"sourceBranch": "types-2.0", | ||
"kind": "Mixed", | ||
"sourceBranch": "master", | ||
"globals": [ | ||
@@ -43,3 +41,3 @@ "Mocha", | ||
"hasPackageJson": false, | ||
"contentHash": "781be81f667ad5dfc5a317c96c9192a944f459427b446063fc6810c335964f04" | ||
"contentHash": "9ab020a6fa3d8772c17b20960f90ef2af5bc6ec9d442c4d76bc8378129565001" | ||
} |
10831
233
18