Files
copilotkit__copilotkit/packages/react-ui/vitest.config.mjs
Mark Fogle c9dd12473b test: add RuleTester coverage for no-single-arg-zod-record
Adds oxlint RuleTester cases for the lint rule introduced in #5025, per
review feedback: valid two-arg forms don't false-positive (including a
single-arg `.record()` on a non-`z` object), the single-arg form fires
with correct autofix output (plain and chained `.optional()`), and a
spread argument reports without a fix. Since the guarded bug is type-level,
this rule is the real regression guard, so it warrants direct coverage.

oxlint's RuleTester requires Node >= 22; the cases are gated to skip on
older runtimes so the Node 20 CI job stays green (the rule itself is
exercised on every Node via the oxlint job). Extends the react-ui vitest
include to pick up co-located oxlint-rules tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 00:34:38 +00:00

12 lines
287 B
JavaScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "node",
globals: true,
include: ["src/**/*.{test,spec}.ts", "oxlint-rules/**/*.{test,spec}.mjs"],
reporters: [["default", { summary: false }]],
silent: true,
},
});