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

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

Open
dandv opened this issue Jan 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dandv
Copy link
Contributor

dandv commented Jan 20, 2025

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
@dandv dandv added bug Something isn't working needs triage labels Jan 20, 2025
@kt3k kt3k removed the needs triage label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants