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

test list gets screwed up when multiple tests have the same name but are in different describe blocks #181

Open
gregveres opened this issue Feb 5, 2020 · 7 comments

Comments

@gregveres
Copy link
Contributor

Is this a bug report or a feature request?

bug

Version Info

  • Version of Majestic: v1.6.2
  • Version of Jest:
  • Version of Node:
  • Operating System:

Reproduction Repo

Create a unit test with two describe blocks and each describe block place the a test with the same name.

describe('block 1', () => {
  it('test name', () => {
    expect(true).toBeTruthy();
  })
}
describe('block 2', () => (
  it('test name', () => {
    expect(false).toBeTruthy();
  })
}

What you will see is the proper display of two describe blocks, each with one test in it, but both tests will show as passing, even though the second one fails.

I assume that you are using the test name as a unique key, which can't be assumed.

@gregveres
Copy link
Contributor Author

If I get to the other feature request of collapsing describe blocks, I will try to fix this.

@gregveres
Copy link
Contributor Author

Apparently when you mention an issue in a github comment, it assumes you are saying that you are fixing the issue with the PR. That is not the case. That PR does not fix this issue. I am looking into this issue to see if I can create a PR for a fix. Hopefully I will submit one today.

@gregveres
Copy link
Contributor Author

I fixed the PR. It now indicates that it will fix the FR, not this bug.

@gregveres
Copy link
Contributor Author

This has now been fixed and unfortunately included the PR of the collapsable UI branch.

@zeevrosental
Copy link

hi!,
any reason why this wasn't merged yet?

@gregveres
Copy link
Contributor Author

@zeevrosental if you want a version that fixes this issue, you can build my fork. It is now up to date with the latest changes from the main fork and it includes few extra enhancements that I will do separate PRs for if this original code is accepted.

@LoganTann
Copy link

Too bad this repo does not seems to be maintained anymore. I spent two hours thinking this was an isolation issue in my codebase ! To finally figure out that the output was different between the gui and the console :(

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

No branches or pull requests

3 participants