Skip to content

Commit

Permalink
docs(*): added change log
Browse files Browse the repository at this point in the history
  • Loading branch information
sarathps93 committed Nov 10, 2020
1 parent 43fb572 commit 0276ed8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
## master

### Chore & Maintenance

- `[jest-circus]` Fixed issues of beforeAll & afterAll hooks getting executed even if it is inside a skipped `describe` block [#10451](https://github.com/facebook/jest/issues/10451)
- `[jest-jasmine2]` Fixed issues of beforeAll & afterAll hooks getting executed even if it is inside a skipped `describe` block when it has child `tests` marked as either `only` or `todo` [#10451](https://github.com/facebook/jest/issues/10451)
- `[jest-jasmine2]` Fixed issues of child `tests` marked with `only` or `todo` getting executed even when it is inside a parent `describe` block with skipped status [#10451](https://github.com/facebook/jest/issues/10451)

### Features

- `[jest-config]` [**BREAKING**] Default to Node testing environment instead of browser (JSDOM) ([#9874](https://github.com/facebook/jest/pull/9874))
Expand Down
3 changes: 2 additions & 1 deletion packages/jest-circus/src/eventHandler.ts
Expand Up @@ -79,6 +79,7 @@ const eventHandler: Circus.EventHandler = (
}
if (
!state.hasFocusedTests &&
currentDescribeBlock.mode !== 'skip' &&
currentDescribeBlock.children.some(
child => child.type === 'test' && child.mode === 'only',
)
Expand Down Expand Up @@ -143,7 +144,7 @@ const eventHandler: Circus.EventHandler = (
timeout,
asyncError,
);
if (test.mode === 'only') {
if (currentDescribeBlock.mode !== 'skip' && test.mode === 'only') {
state.hasFocusedTests = true;
}
currentDescribeBlock.children.push(test);
Expand Down

0 comments on commit 0276ed8

Please sign in to comment.