I'm writing some UI tests using Puppeteer and am curious about the execution order in Mocha.
The Mocha website doesn't explicitly describe the execution order for tests, other than the effect of before/after/beforeEach/afterEach/etc
Clearly from the behavior of Mocha it seems that the execution order is to execute each "describe" block in order, and within that block execute each "it" block in order ... with the caveat of interspersing before/after hooks as appropriate.
Is that understanding correct?
And I do understand that generally tests are supposed to be independent and theoretically can be executed in any order. A UI test is different since a) it doesn't make sense to have multiple tests manipulating the UI at the same time, b) each test needs to know the state of the web browser at the end of the previous test.
+ David Herron