Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beforeAll in skipped describe.onWindows still runs #1

Closed
schubev opened this issue Jan 28, 2020 · 1 comment
Closed

beforeAll in skipped describe.onWindows still runs #1

schubev opened this issue Jan 28, 2020 · 1 comment

Comments

@schubev
Copy link

schubev commented Jan 28, 2020

Let’s say I run the following on GNU/Linux.

describe.onWindows('something', () => {
  beforeAll(() => { /* do some Windows specific stuff */ })
  test.each([1, 2, 3])('test %d', () => { /* test stuff */ })
})

Then the tests will be marked as skipped but the contents of beforeAll will still be run and fail, once for each test.

@qmenoret
Copy link
Contributor

This is also the case with regular jest tests:


describe.skip('toto', () => {
  beforeAll(() => {
    console.log('beforeAll')
  })
  beforeEach(() => {
    console.log('beforeEach')
  })
  it('test', () => {
    console.log('test')
  })
})

The output of this will be:

beforeAll

Closing the issue as this is not related to this package. It has been reported to jest already. Please see: jestjs/jest#8379

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

No branches or pull requests

2 participants