-
What language is this for?
JavaScript -
Which rule?
S2699 -
Why do you believe it’s a false-positive/false-negative?
Similar issue, but for different imports: False positive - S2699 - Add at least one assertion to this test case - #7 by ilia -
SonarQube - which version?
Community Edition v10.5.1 (90531) -
How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
It happens when using assert
library (from node, node:assert
) and sinon
.
import assert from "assert";
import sinon from "sinon";
The test has the following structure:
describe ("", () => {
beforeEach(() => {
});
afterEach(() => {
});
describe("", () => {
it("should exist", () => {
assert.ok(functionName);
});
});
});