This repository has been archived by the owner on Aug 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test): Verified order of callbacks
Added a unit test to make sure we don't run afterEach from other suites
closes #90
- Loading branch information
Showing
1 changed file
with
75 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,75 @@ | ||
/* global describe, ngDescribe, it, beforeEach, afterEach */ | ||
describe('issue 90 - plain BDD', function () { | ||
describe('1', function () { | ||
it('works', function () { | ||
console.log('1.1'); | ||
}); | ||
it('works', function () { | ||
console.log('1.2'); | ||
}); | ||
}); | ||
|
||
describe('2', function () { | ||
afterEach(function () { | ||
console.log('After'); | ||
}); | ||
beforeEach(function () { | ||
console.log('Before'); | ||
}); | ||
it('works', function () { | ||
console.log('2.1'); | ||
}); | ||
it('works', function () { | ||
console.log('2.2'); | ||
}); | ||
}); | ||
|
||
describe('3', function () { | ||
it('works', function () { | ||
console.log('3.1'); | ||
}); | ||
it('works', function () { | ||
console.log('3.2'); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('issue 90 - inside ngDescribe', function () { | ||
ngDescribe({ | ||
name: 'issue 90', | ||
tests: function () { | ||
describe('1', function () { | ||
it('works', function () { | ||
console.log('1.1'); | ||
}); | ||
it('works', function () { | ||
console.log('1.2'); | ||
}); | ||
}); | ||
|
||
describe('2', function () { | ||
afterEach(function () { | ||
console.log('After'); | ||
}); | ||
beforeEach(function () { | ||
console.log('Before'); | ||
}); | ||
it('works', function () { | ||
console.log('2.1'); | ||
}); | ||
it('works', function () { | ||
console.log('2.2'); | ||
}); | ||
}); | ||
|
||
describe('3', function () { | ||
it('works', function () { | ||
console.log('3.1'); | ||
}); | ||
it('works', function () { | ||
console.log('3.2'); | ||
}); | ||
}); | ||
} | ||
}); | ||
}); |