mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Adding test for new mocha API
This commit is contained in:
@@ -24,6 +24,18 @@ function test_context() {
|
||||
});
|
||||
}
|
||||
|
||||
function test_suite() {
|
||||
suite('some context', () => { });
|
||||
|
||||
suite.only('some context', () => { });
|
||||
|
||||
suite.skip('some context', () => { });
|
||||
|
||||
suite('some context', function() {
|
||||
this.timeout(2000);
|
||||
});
|
||||
}
|
||||
|
||||
function test_it() {
|
||||
|
||||
it('does something', () => { });
|
||||
@@ -39,6 +51,21 @@ function test_it() {
|
||||
});
|
||||
}
|
||||
|
||||
function test_test() {
|
||||
|
||||
test('does something', () => { });
|
||||
|
||||
test('does something', (done) => { done(); });
|
||||
|
||||
test.only('does something', () => { });
|
||||
|
||||
test.skip('does something', () => { });
|
||||
|
||||
test('does something', function () {
|
||||
this.timeout(2000);
|
||||
});
|
||||
}
|
||||
|
||||
function test_before() {
|
||||
before(() => { });
|
||||
|
||||
@@ -221,4 +248,4 @@ function test_run_withOnComplete() {
|
||||
instance.run((failures: number): void => {
|
||||
console.log(failures);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user