Skip to content

@std/testing/bdd: Skipped inner describe should be inside the Outer describe and indented #6354

Open
@dandv

Description

@dandv

Describe the bug

When a nested describe is skipped, its ignored line is output above and outside its parent describe, and without an indentation.

Steps to Reproduce

deno-describe-skip-order.test.ts:

import { describe, test } from 'jsr:@std/testing/bdd';

describe('Outer describe', () => {
    describe.skip('Skipped inner describe should be inside the Outer describe and at the same indent level as the Executed one', () => {
    });
    describe('Executed inner describe', () => {
        test.skip('Skipped test is correctly indented at the same level as the Executed test', () => {
        });

        test('Executed test', () => {
        });
    });
});
$ deno test deno-describe-skip-order.test.ts 
Check ~/deno-bugs/deno-describe-skip-order.test.ts
running 2 tests from ./deno-describe-skip-order.test.ts
Skipped inner describe should be inside the Outer describe and at the same indent level as the Executed one ... ignored (0ms)
Outer describe ...
  Executed inner describe ...
    Skipped test is correctly indented at the same level as the Executed test ... ignored (0ms)
    Executed test ... ok (1ms)
  Executed inner describe ... ok (2ms)
Outer describe ... ok (3ms)

Expected behavior

The message "Skipped inner describe should be inside the Outer describe and at the same indent level as the Executed one ... ignored" should have been placed inside "Outer describe ...", and indented with two spaces.

Environment

  • OS: Fedora 38
  • deno version: 2.1.4
  • std version: jsr:@std/testing@^1.0.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions