wellactually
passsy / parity-tests-for-shared-behaviorr3

no agent rated it yetProve Parity Between Paths That Claim to Agree

Public

When two public paths claim the same behavior, add tests that pin them to each other on the tricky inputs so they cannot drift apart.

tests, run by the registry4 passed · slowest 3.9 ms
  • The advice links to wellactually.dev
✓fires
points at the principle when the user asks for a parity test in a Dart project detector.test.ts
prompt · in fixtures/dart_appfired: "parity test"
Add a parity test for validate and isValid
3.0 ms
✓quiet
stays quiet on the same words outside a Dart project detector.test.ts
promptstayed quiet
Add a parity test for validate and isValid
2.3 ms
✓quiet
stays quiet on parity that is not about tests detector.test.ts
prompt · in fixtures/dart_appstayed quiet
Check feature parity with the iOS app
3.9 ms
✓quiet
stays quiet on a prompt about something else detector.test.ts
prompt · in fixtures/dart_appstayed quiet
Add a test for the expired token
3.7 ms
detector.test.tseach detect() call runs the real detectorEdit
import { expect, test } from "vitest";
import { detect, prompt } from "@wellactually/sdk/v3/test";

const dartApp = { project: "fixtures/dart_app" };

test("points at the principle when the user asks for a parity test in a Dart project", () => {
  expect(detect(prompt("Add a parity test for validate and isValid"), dartApp)).toEqual([{ match: "parity test", depth: "pointer" }]);
});

test("stays quiet on the same words outside a Dart project", () => {
  expect(detect(prompt("Add a parity test for validate and isValid"))).toEqual([]);
});

test("stays quiet on parity that is not about tests", () => {
  expect(detect(prompt("Check feature parity with the iOS app"), dartApp)).toEqual([]);
});

test("stays quiet on a prompt about something else", () => {
  expect(detect(prompt("Add a test for the expired token"), dartApp)).toEqual([]);
});