Do hooks run synchronously or in an asynchronous way? #28433
Unanswered
YevheniiaMazur
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am an old user of Cypress and remember that for the first versions, there was some information in cypress.io that Cypress is built on Bluebird promises.
Today I wasn't able to find any such detailed information. Only that cypress commands are promises.
Am I right and Cypress implemented hooks (such as before or beforeAll) also by wrapping them into promises?
And is it safe to use an approach like this:
describe('some description here', () => {
beforeEach('first group of before each commands', () => {
//do something here
});
beforeEach('second group of before each commands', () => {
//do something here
})
it('some random tests', () => {
})
})
Based on the documentation I thought that this potentially could cause both beforeEach hooks executed asynchronously. But I haven't found any confirmation or denial in the documentation
Beta Was this translation helpful? Give feedback.
All reactions