Pattern: Invalid describe callback
Issue: -
The callback function passed to describe()
must be synchronous, have no parameters, and not return any values. Using async callbacks, parameters, or return statements can lead to unexpected test behavior.
Example of incorrect code:
describe("suite", async () => {
test("case", () => {});
});
describe("suite", (done) => {
test("case", () => {});
});
describe("suite", () =>
test("case", () => {})
);
Example of correct code:
describe("suite", () => {
test("case", () => {});
});