Nest test
/it
calls under a single describe
label instead of repeating the describe
label for each test #3342
Open
Description
What is the problem this feature would solve?
bun test
currently repeats the describe
label for each test
/it
call. Take the following test file as an example:
describe("test group 1", () => {
it("does thing 0", () => { expect(0).toBe(0); });
it("does thing 1", () => { expect(1).toBe(1); });
it("does thing 2", () => { expect(2).toBe(2); });
it("does thing 3", () => { expect(3).toBe(3); });
it("does thing 4", () => { expect(4).toBe(4); });
});
describe("test group 2", () => {
it("does thing 5", () => { expect(5).toBe(5); });
it("does thing 6", () => { expect(6).toBe(6); });
it("does thing 7", () => { expect(7).toBe(7); });
it("does thing 8", () => { expect(8).toBe(8); });
it("does thing 9", () => { expect(9).toBe(9); });
});
This produces the following output:
What is the feature you are proposing to solve the problem?
I would prefer a more concise output like Jest, where the describe
label is only printed once and the test
/it
labels are nested beneath it. I believe this is not just cleaner, but also clearer visually.
Here is Jest's output for the same test file:
What alternatives have you considered?
No response
Activity