summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-10-01 06:49:19 -0400
committerDax Raad <[email protected]>2025-10-01 06:49:19 -0400
commit5f61945090ff3cca5b1c01e2b6fb7f73ed6bbb44 (patch)
tree4dd74550b7eda5f6979020982afdb565b5ff6d79
parent41ce56494bb92531bc947332cfa59f8fa0b12146 (diff)
downloadopencode-5f61945090ff3cca5b1c01e2b6fb7f73ed6bbb44.tar.gz
opencode-5f61945090ff3cca5b1c01e2b6fb7f73ed6bbb44.zip
core: remove redundant patch integration test
The integration test was duplicating coverage already provided by the comprehensive patch namespace tests. Users benefit from faster test runs without losing any coverage of patch functionality. The remaining tests provide complete validation of patch parsing, application, and tool integration.
-rw-r--r--packages/opencode/test/patch/integration.test.ts66
1 files changed, 0 insertions, 66 deletions
diff --git a/packages/opencode/test/patch/integration.test.ts b/packages/opencode/test/patch/integration.test.ts
deleted file mode 100644
index c9111b0f4..000000000
--- a/packages/opencode/test/patch/integration.test.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { describe, test, expect } from "bun:test"
-import { Patch } from "../../src/patch"
-
-describe("Patch integration", () => {
- test("should be compatible with existing tool system", () => {
- // Test that our Patch namespace can be imported and used
- expect(Patch).toBeDefined()
- expect(Patch.parsePatch).toBeDefined()
- expect(Patch.applyPatch).toBeDefined()
- expect(Patch.maybeParseApplyPatch).toBeDefined()
- expect(Patch.PatchSchema).toBeDefined()
- })
-
- test("should parse patch format compatible with existing tool", () => {
- const patchText = `*** Begin Patch
-*** Add File: test-integration.txt
-+Integration test content
-*** End Patch`
-
- const result = Patch.parsePatch(patchText)
- expect(result.hunks).toHaveLength(1)
- expect(result.hunks[0].type).toBe("add")
- expect(result.hunks[0].path).toBe("test-integration.txt")
- if (result.hunks[0].type === "add") {
- expect(result.hunks[0].contents).toBe("Integration test content")
- }
- })
-
- test("should handle complex patch with multiple operations", () => {
- const patchText = `*** Begin Patch
-*** Add File: new-file.txt
-+This is a new file
-+with multiple lines
-*** Update File: existing.txt
-@@
- old content
--line to remove
-+line to add
- more content
-*** Delete File: old-file.txt
-*** End Patch`
-
- const result = Patch.parsePatch(patchText)
- expect(result.hunks).toHaveLength(3)
-
- // Check add operation
- expect(result.hunks[0].type).toBe("add")
- if (result.hunks[0].type === "add") {
- expect(result.hunks[0].contents).toBe("This is a new file\nwith multiple lines")
- }
-
- // Check update operation
- expect(result.hunks[1].type).toBe("update")
- if (result.hunks[1].type === "update") {
- expect(result.hunks[1].path).toBe("existing.txt")
- expect(result.hunks[1].chunks).toHaveLength(1)
- expect(result.hunks[1].chunks[0].old_lines).toEqual(["old content", "line to remove", "more content"])
- expect(result.hunks[1].chunks[0].new_lines).toEqual(["old content", "line to add", "more content"])
- expect(result.hunks[1].chunks[0].change_context).toBeUndefined()
- }
-
- // Check delete operation
- expect(result.hunks[2].type).toBe("delete")
- expect(result.hunks[2].path).toBe("old-file.txt")
- })
-}) \ No newline at end of file