#181·majestic

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

Author: gregveresCreated Feb 5, 2020Updated Apr 2, 2024

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.