From 0ab4ac646841e21865f0d6e552584de2966cdb73 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 14 Feb 2026 20:25:11 +0000 Subject: [PATCH] test: drop duplicate isMessagingToolDuplicate suite --- ...lpers.ismessagingtoolduplicate.e2e.test.ts | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 src/agents/pi-embedded-helpers.ismessagingtoolduplicate.e2e.test.ts diff --git a/src/agents/pi-embedded-helpers.ismessagingtoolduplicate.e2e.test.ts b/src/agents/pi-embedded-helpers.ismessagingtoolduplicate.e2e.test.ts deleted file mode 100644 index 2527218d8d3..00000000000 --- a/src/agents/pi-embedded-helpers.ismessagingtoolduplicate.e2e.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { isMessagingToolDuplicate } from "./pi-embedded-helpers.js"; -import { DEFAULT_AGENTS_FILENAME } from "./workspace.js"; - -const _makeFile = (overrides: Partial): WorkspaceBootstrapFile => ({ - name: DEFAULT_AGENTS_FILENAME, - path: "/tmp/AGENTS.md", - content: "", - missing: false, - ...overrides, -}); -describe("isMessagingToolDuplicate", () => { - it("returns false for empty sentTexts", () => { - expect(isMessagingToolDuplicate("hello world", [])).toBe(false); - }); - it("returns false for short texts", () => { - expect(isMessagingToolDuplicate("short", ["short"])).toBe(false); - }); - it("detects exact duplicates", () => { - expect( - isMessagingToolDuplicate("Hello, this is a test message!", [ - "Hello, this is a test message!", - ]), - ).toBe(true); - }); - it("detects duplicates with different casing", () => { - expect( - isMessagingToolDuplicate("HELLO, THIS IS A TEST MESSAGE!", [ - "hello, this is a test message!", - ]), - ).toBe(true); - }); - it("detects duplicates with emoji variations", () => { - expect( - isMessagingToolDuplicate("Hello! 👋 This is a test message!", [ - "Hello! This is a test message!", - ]), - ).toBe(true); - }); - it("detects substring duplicates (LLM elaboration)", () => { - expect( - isMessagingToolDuplicate('I sent the message: "Hello, this is a test message!"', [ - "Hello, this is a test message!", - ]), - ).toBe(true); - }); - it("detects when sent text contains block reply (reverse substring)", () => { - expect( - isMessagingToolDuplicate("Hello, this is a test message!", [ - 'I sent the message: "Hello, this is a test message!"', - ]), - ).toBe(true); - }); - it("returns false for non-matching texts", () => { - expect( - isMessagingToolDuplicate("This is completely different content.", [ - "Hello, this is a test message!", - ]), - ).toBe(false); - }); -});