Skip to content

RuleTester detection seems like it could use improving #248

Closed
@G-Rath

Description

@G-Rath

I've noticed the RuleTester detection logic seems to trip up on what I'd consider common or easy to support cases - the latest was that it didn't flag this test as duplicated because I've got the tests wrapped in a describe.

e.g.

describe('reference tests', () => {
  ruleTester.run('esm', rule, {
    valid: ['not flagged', 'not flagged'],
    invalid: [],
  });
});

ruleTester.run('esm', rule, {
  valid: ['not flagged', 'not flagged'],
  invalid: [],
});

I think there was at least another instance where it didn't seem to pick up alternative names, but it's been a while so can't remember the details.

I've not yet had the time to dig into this that deeply but wanted to open this issue in the meantime to get some discussion going - I'm happy to help with trying to improve the logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions