Skip to content

Support additional describe aliases #73

@blimmer

Description

@blimmer

Would you consider support for identifying describe aliases (like context)? I've got a client that sets global.context = describe so they can write tests like:

describe('some method', () => {
  context('when something is true', () => {
     beforeEach(() => {
       // make 'something' true
     });
     it('does things', () => {
       // test
     });
  });
});

This used to be a jest feature, and it seems like some folks are still using this global trick like they are: jestjs/jest#2468.

Sadly, because they use context, it breaks a vs-code plugin I use (https://github.com/firsttris/vscode-jest-runner) because only describe blocks are identified by this package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions