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

No duplicated test name (it+describes) rule #379

Open
MikeDabrowski opened this issue Feb 3, 2025 · 0 comments
Open

No duplicated test name (it+describes) rule #379

MikeDabrowski opened this issue Feb 3, 2025 · 0 comments

Comments

@MikeDabrowski
Copy link

Is your feature request related to a problem? Please describe.

Gitlab has a feature that reports tests - it shows test count and test errors in the ui. This relies on junit report generated from the karma/jasmine test setup. But UI shows incorrect values when tests have duplicated names. By 'name' I mean whole 'path' - a concatenated string of 'it' and every parent 'describe' names.

This library has two rules for detecting the duplicated names. One for 'it's and one for 'describes'. They are not able to detect such condition.

Describe the solution you'd like

I propose to create 3rd 'no-duplicate-test-name' rule that will join both other rules to check for a full name of each test. It should start from each 'it' and go up the 'tree' of 'describes' concatenating the names. If I remember correctly, gitlab and junit concatenate using - (space, dash, space) but it shouldn't matter.

Describe alternatives you've considered

We currently have a custom rule that checks this, but since we also use this lib and it comes very close to this, I figured it might be worth adding such rule here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant