Updated file header and included tests.

This commit is contained in:
Kazi Manzur Rashid
2013-04-20 10:18:58 +06:00
parent 0fea2d1a86
commit fa81134a20
2 changed files with 57 additions and 0 deletions

52
mocha/mocha-tests.ts Normal file
View 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
View File

@@ -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;