Where to put `beforeEach` for all test cases?

Viewed 379

What's the difference between these two tests:

beforeEach(doSomething)

describe("i am the only root describe in this test file", () => {
    // many test cases...
})
describe("i am the only root describe in this test file", () => {
    beforeEach(doSomething)
    // many test cases...
})
1 Answers
Related