From fa81134a206f161a649d1d1b4c28c91cbfc35fa4 Mon Sep 17 00:00:00 2001 From: Kazi Manzur Rashid Date: Sat, 20 Apr 2013 10:18:58 +0600 Subject: [PATCH] Updated file header and included tests. --- mocha/mocha-tests.ts | 52 ++++++++++++++++++++++++++++++++++++++++++++ mocha/mocha.d.ts | 5 +++++ 2 files changed, 57 insertions(+) create mode 100644 mocha/mocha-tests.ts diff --git a/mocha/mocha-tests.ts b/mocha/mocha-tests.ts new file mode 100644 index 000000000..53c8e5720 --- /dev/null +++ b/mocha/mocha-tests.ts @@ -0,0 +1,52 @@ +/// + +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(); }); +} \ No newline at end of file diff --git a/mocha/mocha.d.ts b/mocha/mocha.d.ts index b722277c3..93b894ed6 100644 --- a/mocha/mocha.d.ts +++ b/mocha/mocha.d.ts @@ -1,3 +1,8 @@ +// Type definitions for mocha 1.9.0 +// Project: http://visionmedia.github.io/mocha/ +// Definitions by: Kazi Manzur Rashid +// DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped + declare var describe : { (description: string, spec: () => void): void; only(description: string, spec: () => void): void;