Skip to content

No tests matched when we run on specific test #62

@samnang

Description

@samnang

I noticed the behavior of parser to discover the position of test only supports a string in describe(string). It will not work if we have the real class name like this example below:

describe(Calculator, () => {    // <---- will not match
  it("sum a and b", () => {     // <---- run the nearest test
    expect(new Calculator().sum(1, 2)).toEqual(3);
  });
});

describe("Calculator", () => {    // <---- works
  it("sum a and b", () => {       // <---- run the nearest test
    expect(new Calculator().sum(1, 2)).toEqual(3);
  });
});

Metadata

Metadata

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