all: remove testify
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s51244611964f2413k
diff --git a/claudetool/browse/browse_test.go b/claudetool/browse/browse_test.go
index d417a06..f82c35e 100644
--- a/claudetool/browse/browse_test.go
+++ b/claudetool/browse/browse_test.go
@@ -12,7 +12,6 @@
"time"
"github.com/chromedp/chromedp"
- "github.com/stretchr/testify/require"
"sketch.dev/llm"
)
@@ -324,23 +323,37 @@
resizeTool := tools.NewResizeTool()
input := json.RawMessage(`{"width": 375, "height": 667}`)
content, err := resizeTool.Run(ctx, input)
- require.NoError(t, err)
- require.Contains(t, content[0].Text, "success")
+ if err != nil {
+ t.Fatalf("Error: %v", err)
+ }
+ if !strings.Contains(content[0].Text, "success") {
+ t.Fatalf("Expected success in response, got: %s", content[0].Text)
+ }
// Navigate to a test page and verify using JavaScript to get window dimensions
navInput := json.RawMessage(`{"url": "https://example.com"}`)
content, err = tools.NewNavigateTool().Run(ctx, navInput)
- require.NoError(t, err)
- require.Contains(t, content[0].Text, "success")
+ if err != nil {
+ t.Fatalf("Error: %v", err)
+ }
+ if !strings.Contains(content[0].Text, "success") {
+ t.Fatalf("Expected success in response, got: %s", content[0].Text)
+ }
// Check dimensions via JavaScript
evalInput := json.RawMessage(`{"expression": "({width: window.innerWidth, height: window.innerHeight})"}`)
content, err = tools.NewEvalTool().Run(ctx, evalInput)
- require.NoError(t, err)
+ if err != nil {
+ t.Fatalf("Error: %v", err)
+ }
// The dimensions might not be exactly what we set (browser chrome, etc.)
// but they should be close
- require.Contains(t, content[0].Text, "width")
- require.Contains(t, content[0].Text, "height")
+ if !strings.Contains(content[0].Text, "width") {
+ t.Fatalf("Expected width in response, got: %s", content[0].Text)
+ }
+ if !strings.Contains(content[0].Text, "height") {
+ t.Fatalf("Expected height in response, got: %s", content[0].Text)
+ }
})
}
diff --git a/dear_llm.md b/dear_llm.md
index 1c01983..51545d9 100644
--- a/dear_llm.md
+++ b/dear_llm.md
@@ -22,3 +22,7 @@
## Meta
The program you are working on is Sketch. The program you are running is Sketch. This can be slightly confusing: Carefully distinguish the prompt and tools you have from the codebase you are working on. Modifying the code does not change your prompt or tools.
+
+## Testing
+
+- Do NOT use the testify package. Write tests using the standard Go testing library only.
diff --git a/go.mod b/go.mod
index 462a675..95c16f2 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,7 @@
go 1.24.3
require (
+ github.com/chromedp/cdproto v0.0.0-20250403032234-65de8f5d025b
github.com/chromedp/chromedp v0.13.6
github.com/creack/pty v1.1.24
github.com/dustin/go-humanize v1.0.1
@@ -16,7 +17,6 @@
github.com/pkg/sftp v1.13.9
github.com/richardlehane/crock32 v1.0.1
github.com/sashabaranov/go-openai v1.38.2
- github.com/stretchr/testify v1.10.0
go.skia.org/infra v0.0.0-20250421160028-59e18403fd4a
golang.org/x/crypto v0.37.0
golang.org/x/net v0.39.0
@@ -28,9 +28,7 @@
require (
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
- github.com/chromedp/cdproto v0.0.0-20250403032234-65de8f5d025b // indirect
github.com/chromedp/sysutil v1.1.0 // indirect
- github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-json-experiment/json v0.0.0-20250211171154-1ae217ad3535 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
@@ -38,11 +36,9 @@
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
- gopkg.in/yaml.v3 v3.0.1 // indirect
)
tool golang.org/x/tools/cmd/stringer
diff --git a/go.sum b/go.sum
index 1e248df..65d5385 100644
--- a/go.sum
+++ b/go.sum
@@ -154,7 +154,6 @@
golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU=
golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=