You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
Cypress: 8.4.0/8.5.0
Node: 14.0.0
Typescript: 4.3.2
We have nested describe structure for our test as shown below:
describe('someTest',()=>{
let someVar;
after(()=>{
someVar=null;
});
before(()=> {
loginApp(...);
});
describe('when feature flag is on',()=>{
before(()=>{
onlyOn(...);
})
it('should....')
describe('the user clicks on 1...')
describe('the user clicks on 2 ...')
})
});
what’s happening in the above is that when onlyOn is true, for some reason cypress (or something cypress does to mocha) is looking to execute an after() block immediately after the before(). It is “finding” the one at the root and executing it so the variables are prematurely null’d. So our session ends when control go for describe('the user clicks on 1...').
P.S. after() and before() are hooks.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Cypress: 8.4.0/8.5.0
Node: 14.0.0
Typescript: 4.3.2
We have nested describe structure for our test as shown below:
what’s happening in the above is that when onlyOn is true, for some reason cypress (or something cypress does to mocha) is looking to execute an after() block immediately after the before(). It is “finding” the one at the root and executing it so the variables are prematurely null’d. So our session ends when control go for describe('the user clicks on 1...').
P.S. after() and before() are hooks.
The text was updated successfully, but these errors were encountered: