Before() is executed even if it's parent is filtered out
See original GitHub issueWith this spec file:
describe('Cypress grep', {
tags: '@smoke'
}, () => {
before(() => {
expect(false).to.equal(true)
})
it('succeeds', () => {
expect(true).to.equal(true)
})
})
When executing cypress with --env grepTags=-@smoke
, the test fails because the before()
function is executed even though the whole describe is not supposed to be executed.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Before() is executed even if it's parent is filtered out #24448
When executing cypress with --env grepTags=-@smoke , the test fails because the before() function is executed even though the whole describe is ...
Read more >Why is Cypress saying my element is detached after just ...
Question: I can see in the DOM that this element is still present - there is no logic that will detach this element...
Read more >Considerations for Lookup Filters - Salesforce Help
As a workaround, we recommend doing lookup filter validation for a record's fields before changing the record's owner. Spanning Relationships in Lookup Filters....
Read more >git-filter-branch Documentation - Git
If you still need to use git filter-branch, please carefully read SAFETY ... real filter executed for each commit but a one time...
Read more >Array.prototype.filter() - JavaScript - MDN Web Docs
The filter() method creates a shallow copy of a portion of a given ... not even obtained as it's been popped off 'words'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue is also reproductible for after() hook
We upgraded to the new version since grepOmitFiltered actually works to bypass this issue: https://github.com/cypress-io/cypress-grep/pull/84