before hook still reruns on Cypress 8.4.0 #18128
Labels
stage: awaiting response
Potential fix was proposed; awaiting response
stale
no activity on this issue for a long period
Current behavior
before hook triggers multiple times inside one describe() block.
Desired behavior
Before hook inside one describe() block should be triggered only once.
Test code to reproduce
describe("Testing", () => {
before(() => {
cy.log("Before hook is called!");
});
beforeEach(() => {
cy.log("Before each hook is called");
});
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("says hi", () => {
cy.visit("www.google.com");
cy.log("Hi!");
});
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
it("do something", () => { expect(true).to.be.eq(true); });
});
Cypress Version
8.4.0
Other
I'm very surprised that after 8.4 update this thing still doesn't work. This is so simple test and yet nobody tried it before merge/push... sad
The text was updated successfully, but these errors were encountered: