This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
Runs before block as well although the tests don't run #28
Comments
What happens if you set it to it.skip for all tests in the second block? Does it still run the before hook? It could be how mocha and cypress execute it
…Sent from my iPhone
On May 7, 2021, at 09:37, Vinayak ***@***.***> wrote:
One specific issue is that the before block runs for tests which are not supposed to run.
describe('My First Test', () => {
it('Does not do much! @smoke', () => {
expect(true).to.equal(true)
})
it("Does not do much either!, but shouldn't run", () => {
expect(true).to.equal(true)
})
})
describe('Tests with before block', () => {
before('You know, setting up fixtures', () => {
cy.visit('http://google.com')
cy.log('setting up fixtures')
})
it('Tests with the before block', () => {
expect(true).to.equal(true)
})
it("Tests with the before block, again", () => {
expect(true).to.equal(true)
})
})
Strangely the commands of the before block doesn't show up in the command log.
Here if I grep with @smoke the tests in second describe block won't run but the before block does. Is there any way to skip them as well ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Not sure if there is a workaround for this, I want to take a stab at this. |
@bahmutov I tried with the |
So this is mocha problem. I think in this case one would need to explicitly skip the suite and use tags
…Sent from my iPhone
On May 7, 2021, at 09:47, Vinayak ***@***.***> wrote:
@bahmutov I tried with the it.skip for all the tests in second block. It still runs the before hook.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yeah since this is consistent with mocha, shall I close the issue ? |
Yeah since this plug-in cannot really control this
…Sent from my iPhone
On May 7, 2021, at 10:15, Vinayak ***@***.***> wrote:
Yeah since this is consistent with mocha, shall I close the issue ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Closing the issue, since this is consistent with mocha and plugin cannot do much. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
One specific issue is that the before block runs for tests which are not supposed to run.
Strangely the commands of the before block doesn't show up in the command log.
Here if I grep with @smoke the tests in second describe block won't run but the before block does. Is there any way to skip them as well ?
The text was updated successfully, but these errors were encountered: