generated from nhcarrigan/template
feat: replace no only tests with vitest (!2)
This gives us a much more robust configuration for our rules. Additionally, it expects tests to be converted to the `expect` API. Reviewed-on: https://codeberg.org/nhcarrigan/eslint-config/pulls/2 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { vitestRules } from "../src/rules/vitest.ts";
|
||||
|
||||
describe("vitest configs", () => {
|
||||
it("should never be an error", () => {
|
||||
expect.assertions(45);
|
||||
const rules = Object.entries(vitestRules);
|
||||
for (const [ name, rule ] of rules) {
|
||||
expect(Array.isArray(rule)
|
||||
? rule.at(0)
|
||||
: rule, `${name} appears to be set to an error!`).not.toBe("error");
|
||||
continue;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user