mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Merge pull request #2221 from otiai10/pr/update-mocha
Update mocha.d.ts: add `context` statement
This commit is contained in:
@@ -12,6 +12,18 @@ function test_describe() {
|
||||
});
|
||||
}
|
||||
|
||||
function test_context() {
|
||||
context('some context', () => { });
|
||||
|
||||
context.only('some context', () => { });
|
||||
|
||||
context.skip('some context', () => { });
|
||||
|
||||
context('some context', function() {
|
||||
this.timeout(2000);
|
||||
});
|
||||
}
|
||||
|
||||
function test_it() {
|
||||
|
||||
it('does something', () => { });
|
||||
|
||||
Vendored
+9
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for mocha 1.17.1
|
||||
// Project: http://visionmedia.github.io/mocha/
|
||||
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/> and otiai10 <https://github.com/otiai10>
|
||||
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface Mocha {
|
||||
@@ -59,6 +59,14 @@ declare var describe : {
|
||||
timeout(ms: number): void;
|
||||
}
|
||||
|
||||
// alias for `describe`
|
||||
declare var context : {
|
||||
(contextTitle: string, spec: () => void): void;
|
||||
only(contextTitle: string, spec: () => void): void;
|
||||
skip(contextTitle: string, spec: () => void): void;
|
||||
timeout(ms: number): void;
|
||||
}
|
||||
|
||||
declare var it: {
|
||||
(expectation: string, assertion?: () => void): void;
|
||||
(expectation: string, assertion?: (done: MochaDone) => void): void;
|
||||
|
||||
Reference in New Issue
Block a user