lo1tuma / eslint-plugin-mocha

ESLint rules for mocha
MIT License
281 stars 61 forks source link

`no-empty-description` does not detected when in the same line happens also the `no-exclusive-tests` #363

Open sokraglav13 opened 1 month ago

sokraglav13 commented 1 month ago

Hello, I found an issue when Im running npx eslint Test-1.test.js in the test case. The issue is that in the same lines breaks two rules but in console prints only the one rule.

My System Specs

Node: v18.17.0 eslint: v8.57.1 slint-plugin-mocha: v10.5.0

Reproduce Steps

1) The structure of the test is as below: it.only("", async function () { ... }); 2) Run npx eslint Test-1.test.js

Output

`error  Unexpected exclusive mocha test  mocha/no-exclusive-test

` So the question is should find both rules in one line ? Has anyone identify this behaviour ?

Thank you!

lo1tuma commented 1 month ago

Interesting. It seems no-empty-description only detects empty descriptions when not using a modifier like .only(). So it("", () => {}) is detected but it.only("", () => {}) is not detected. That is something we should fix.