Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2722437
commit b55a165
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
var parallel = require('../../lib/parallel'); | ||
var assert = require('assert') | ||
|
||
var i = 0; | ||
|
||
before('root before', function() { | ||
console.log('root before') | ||
i++; | ||
}); | ||
|
||
beforeEach('root beforeEach', function() { | ||
console.log('root beforeEach') | ||
i++; | ||
}); | ||
|
||
afterEach('root afterEach', function() { | ||
console.log('root afterEach') | ||
i++; | ||
}); | ||
|
||
after('root after', function() { | ||
console.log('root after') | ||
i++; | ||
}); | ||
|
||
parallel('first suite', function() { | ||
before(function() { | ||
console.log('parallel before') | ||
i++; | ||
}); | ||
|
||
beforeEach('hook with title', function() { | ||
console.log('parallel beforeEach') | ||
i++; | ||
}); | ||
|
||
afterEach(function() { | ||
console.log('parallel afterEach') | ||
i++; | ||
}); | ||
|
||
after(function() { | ||
console.log('parallel after') | ||
i++; | ||
}); | ||
|
||
it('test', function() { | ||
assert.equal(i, 4) | ||
}); | ||
}); | ||
|
||
parallel('second suite', function() { | ||
before(function() { | ||
console.log('parallel before') | ||
i++; | ||
}); | ||
|
||
beforeEach('hook with title', function() { | ||
console.log('parallel beforeEach') | ||
i++; | ||
}); | ||
|
||
afterEach(function() { | ||
console.log('parallel afterEach') | ||
i++; | ||
}); | ||
|
||
after(function() { | ||
console.log('parallel after') | ||
i++; | ||
}); | ||
|
||
it('test', function() { | ||
i++; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters