mocha-runner-hooker
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "mocha-runner-hooker", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Additional functionality for each mocha test by hooks", | ||
@@ -23,3 +23,17 @@ "main": "./build/index", | ||
"url": "https://github.com/udarrr" | ||
} | ||
}, | ||
"keywords": [ | ||
"mocha", | ||
"hook", | ||
"hooks", | ||
"runner", | ||
"test", | ||
"testing", | ||
"before all", | ||
"before each", | ||
"after each", | ||
"after all", | ||
"globalSetup", | ||
"globalTeardown" | ||
] | ||
} |
@@ -22,27 +22,2 @@ # mocha-runner-hooker | ||
```javascript | ||
//without mocha-runner-hooker | ||
describe('Suite', function () { | ||
it('Test 1', async () => { | ||
console.log('test 1'); | ||
}); | ||
}); | ||
``` | ||
```javascript | ||
//with mocha-runner-hooker | ||
describe('Suite', function () { | ||
before(async function () {}); //on fly | ||
before(async function () {}); //on fly | ||
beforeEach(async function () {}); //on fly | ||
afterEach(async function () {}); //on fly | ||
after(async function () {}); //on fly | ||
after(async function () {}); //on fly | ||
it('Test 1', async () => { | ||
console.log('test 1'); | ||
}); | ||
}); | ||
``` | ||
## Add new hooks to runner | ||
@@ -57,3 +32,3 @@ | ||
hookType: 'before all', | ||
hookTitle: 'skip option', | ||
hookTitle: 'hello', | ||
order: 'Top', | ||
@@ -66,3 +41,3 @@ hookFn: () => { | ||
hookType: 'after all', | ||
hookTitle: 'skip option', | ||
hookTitle: 'hello', | ||
order: 'Top', | ||
@@ -75,3 +50,3 @@ hookFn: () => { | ||
hookType: 'after each', | ||
hookTitle: 'skip option', | ||
hookTitle: 'hello', | ||
order: 'Top', | ||
@@ -84,3 +59,3 @@ hookFn: () => { | ||
hookType: 'before each', | ||
hookTitle: 'skip option', | ||
hookTitle: 'hello', | ||
order: 'Top', | ||
@@ -87,0 +62,0 @@ hookFn: () => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22605
18
259
97