Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

After hook is executing when cy.skipOn() is used #196

Open
MateuszKobiera opened this issue Dec 15, 2022 · 0 comments
Open

After hook is executing when cy.skipOn() is used #196

MateuszKobiera opened this issue Dec 15, 2022 · 0 comments

Comments

@MateuszKobiera
Copy link

MateuszKobiera commented Dec 15, 2022

Cypress v12.1.0
Node 18.12.1

Code:
describe("test", () => { before(() => { cy.skipOn(1 < 2); }); after(() => { cy.visit(""); }); it("test", () => { cy.visit(""); }); });

Current behaviour
After hook is still executed if we try to skip test in before hook.
cy.skipOn() in after hook does not work
after(() => { cy.skipOn(1 < 2); cy.visit(""); });
this.skip forbidden error

Expected behaviour
After hook should not be executed if we skip test

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant