Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 1x 1x | import vitest from "@vitest/eslint-plugin";
import joinery from "../rules/index.ts";
const CALL_ORDER =
"Assert the outcome (the call that matters, with `toHaveBeenCalledWith`, or the state it left) instead of which call came when; a reorder that changes nothing must not fail the spec.";
const vitestConfig = {
files: ["**/*.spec.ts"],
plugins: { vitest, joinery },
rules: {
...vitest.configs.recommended.rules,
"vitest/no-restricted-matchers": [
"error",
{
toHaveBeenNthCalledWith: CALL_ORDER,
"not.toHaveBeenNthCalledWith": CALL_ORDER,
toMatchSnapshot:
"Assert the values that matter; a snapshot passes whatever it was first given and fails on every unrelated change.",
toMatchInlineSnapshot:
"Assert the values that matter; a snapshot passes whatever it was first given and fails on every unrelated change.",
},
],
"joinery/no-implementation-details": "error",
},
languageOptions: {
globals: { ...vitest.environments.env.globals },
},
settings: { vitest: { typecheck: true } },
};
export default vitestConfig;
|