mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
Updated file header and included tests.
This commit is contained in:
52
mocha/mocha-tests.ts
Normal file
52
mocha/mocha-tests.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
/// <reference path="mocha.d.ts" />
|
||||
|
||||
function test_describe() {
|
||||
describe('something', () => { });
|
||||
|
||||
describe.only('something', () => { });
|
||||
|
||||
describe.skip('something', () => { });
|
||||
|
||||
describe('something', function() {
|
||||
this.timeout(2000);
|
||||
});
|
||||
}
|
||||
|
||||
function test_it() {
|
||||
|
||||
it('does something', () => { });
|
||||
|
||||
it('does something', (done) => { done(); });
|
||||
|
||||
it.only('does something', () => { });
|
||||
|
||||
it.skip('does something', () => { });
|
||||
|
||||
it('does something', function () {
|
||||
this.timeout(2000);
|
||||
});
|
||||
}
|
||||
|
||||
function test_before() {
|
||||
before(() => { });
|
||||
|
||||
before((done) => { done(); });
|
||||
}
|
||||
|
||||
function test_after() {
|
||||
after(() => { });
|
||||
|
||||
after((done) => { done(); });
|
||||
}
|
||||
|
||||
function test_beforeEach() {
|
||||
beforeEach(() => { });
|
||||
|
||||
beforeEach((done) => { done(); });
|
||||
}
|
||||
|
||||
function test_afterEach() {
|
||||
afterEach(() => { });
|
||||
|
||||
afterEach((done) => { done(); });
|
||||
}
|
||||
5
mocha/mocha.d.ts
vendored
5
mocha/mocha.d.ts
vendored
@@ -1,3 +1,8 @@
|
||||
// Type definitions for mocha 1.9.0
|
||||
// Project: http://visionmedia.github.io/mocha/
|
||||
// Definitions by: Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>
|
||||
// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare var describe : {
|
||||
(description: string, spec: () => void): void;
|
||||
only(description: string, spec: () => void): void;
|
||||
|
||||
Reference in New Issue
Block a user