Execute all parent beforeEach and afterEach functions for each test

This commit is contained in:
jshayes
2024-10-11 23:32:45 -04:00
parent 0c57142c03
commit a6cd83665c
13 changed files with 77 additions and 22 deletions

View File

@ -25,3 +25,19 @@ it('gets executed before each test once again', function () {
beforeEach(function () {
$this->bar++;
});
describe('outer', function () {
beforeEach(function () {
$this->bar++;
});
describe('inner', function () {
beforeEach(function () {
$this->bar++;
});
it('should call all parent beforeEach functions', function () {
expect($this->bar)->toBe(3);
});
});
});