Merge pull request #6364 from mnahkies/mocha-hook-descriptions

Add support for descriptions on hooks
This commit is contained in:
Masahiro Wakame
2015-11-03 00:10:03 +09:00
2 changed files with 32 additions and 0 deletions
+16
View File
@@ -70,6 +70,10 @@ function test_before() {
before(() => { });
before((done) => { done(); });
before("my description", () => { });
before("my description", done => { });
}
function test_setup() {
@@ -82,6 +86,10 @@ function test_after() {
after(() => { });
after((done) => { done(); });
after("my description", () => { });
after("my description", done => { });
}
function test_teardown() {
@@ -94,6 +102,10 @@ function test_beforeEach() {
beforeEach(() => { });
beforeEach((done) => { done(); });
beforeEach("my description", () => { });
beforeEach("my description", done => { });
}
function test_suiteSetup() {
@@ -106,6 +118,10 @@ function test_afterEach() {
afterEach(() => { });
afterEach((done) => { done(); });
afterEach("my description", () => { });
afterEach("my description", done => { });
}
function test_suiteTeardown() {
+16
View File
@@ -49,6 +49,10 @@ declare function before(action: () => void): void;
declare function before(action: (done: MochaDone) => void): void;
declare function before(description: string, action: () => void): void;
declare function before(description: string, action: (done: MochaDone) => void): void;
declare function setup(action: () => void): void;
declare function setup(action: (done: MochaDone) => void): void;
@@ -57,6 +61,10 @@ declare function after(action: () => void): void;
declare function after(action: (done: MochaDone) => void): void;
declare function after(description: string, action: () => void): void;
declare function after(description: string, action: (done: MochaDone) => void): void;
declare function teardown(action: () => void): void;
declare function teardown(action: (done: MochaDone) => void): void;
@@ -65,6 +73,10 @@ declare function beforeEach(action: () => void): void;
declare function beforeEach(action: (done: MochaDone) => void): void;
declare function beforeEach(description: string, action: () => void): void;
declare function beforeEach(description: string, action: (done: MochaDone) => void): void;
declare function suiteSetup(action: () => void): void;
declare function suiteSetup(action: (done: MochaDone) => void): void;
@@ -73,6 +85,10 @@ declare function afterEach(action: () => void): void;
declare function afterEach(action: (done: MochaDone) => void): void;
declare function afterEach(description: string, action: () => void): void;
declare function afterEach(description: string, action: (done: MochaDone) => void): void;
declare function suiteTeardown(action: () => void): void;
declare function suiteTeardown(action: (done: MochaDone) => void): void;