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;