Repository: eslint/eslint
File: tests/lib/rule-tester/flat-rule-tester.js (JavaScript)

Code before:
            sinon.assert.calledWith(spyRuleTesterDescribe, "no-var");
        });

        it("should create a valid test suite if there is a valid test case", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: ["value = 0;"],
                invalid: []
            });
            sinon.assert.calledWith(spyRuleTesterDescribe, "valid");
        });

        it("should not create a valid test suite if there are no valid test cases", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: [],
                invalid: [
                    {
                        code: "var value = 0;",
                        errors: [/^Bad var/u],
                        output: " value = 0;"
                    }
                ]
            });
            sinon.assert.neverCalledWith(spyRuleTesterDescribe, "valid");
        });

        it("should create a valid test suite if there is an invalid test case", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: ["value = 0;"],
                invalid: [
                    {
                        code: "var value = 0;",
                        errors: [/^Bad var/u],
                        output: " value = 0;"
                    }
                ]
            });
            sinon.assert.calledWith(spyRuleTesterDescribe, "invalid");
        });

        it("should not create an invalid test suite if there are no invalid test cases", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: ["value = 0;"],
                invalid: []
            });
            sinon.assert.neverCalledWith(spyRuleTesterDescribe, "invalid");
        });
    });
});


Review comment (suggestion):
```suggestion
        it("should create an invalid test suite if there is an invalid test case", () => {
```

I think this is what this test case is testing.

Code after:
            sinon.assert.calledWith(spyRuleTesterDescribe, "no-var");
        });

        it("should create a valid test suite if there is a valid test case", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: ["value = 0;"],
                invalid: []
            });
            sinon.assert.calledWith(spyRuleTesterDescribe, "valid");
        });

        it("should not create a valid test suite if there are no valid test cases", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: [],
                invalid: [
                    {
                        code: "var value = 0;",
                        errors: [/^Bad var/u],
                        output: " value = 0;"
                    }
                ]
            });
            sinon.assert.neverCalledWith(spyRuleTesterDescribe, "valid");
        });

        it("should create an invalid test suite if there is an invalid test case", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: [],
                invalid: [
                    {
                        code: "var value = 0;",
                        errors: [/^Bad var/u],
                        output: " value = 0;"
                    }
                ]
            });
            sinon.assert.calledWith(spyRuleTesterDescribe, "invalid");
        });

        it("should not create an invalid test suite if there are no invalid test cases", () => {
            ruleTester.run("no-var", require("../../fixtures/testers/rule-tester/no-var"), {
                valid: ["value = 0;"],
                invalid: []
            });
            sinon.assert.neverCalledWith(spyRuleTesterDescribe, "invalid");
        });
    });
});