diff --git a/README.md b/README.md index e3d06428..a0db416b 100644 --- a/README.md +++ b/README.md @@ -362,7 +362,7 @@ package main import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" ) diff --git a/examples/extensions/extension_test_template.go b/examples/extensions/extension_test_template.go index f2d1d72b..93acb39c 100644 --- a/examples/extensions/extension_test_template.go +++ b/examples/extensions/extension_test_template.go @@ -15,7 +15,7 @@ import ( "testing" "github.com/mark3labs/kit/internal/extensions" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" ) // Test that your extension loads without errors diff --git a/examples/extensions/tool-logger_test.go b/examples/extensions/tool-logger_test.go index 174df96c..906cc0bb 100644 --- a/examples/extensions/tool-logger_test.go +++ b/examples/extensions/tool-logger_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/mark3labs/kit/internal/extensions" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" ) // Test that the tool-logger extension loads and registers handlers diff --git a/internal/extensions/test/README.md b/pkg/extensions/test/README.md similarity index 97% rename from internal/extensions/test/README.md rename to pkg/extensions/test/README.md index 9fec2ee6..d2e51a62 100644 --- a/internal/extensions/test/README.md +++ b/pkg/extensions/test/README.md @@ -1,6 +1,6 @@ # Testing Kit Extensions -The `github.com/mark3labs/kit/internal/extensions/test` package provides utilities for testing Kit extensions using standard Go testing patterns. +The `github.com/mark3labs/kit/pkg/extensions/test` package provides utilities for testing Kit extensions using standard Go testing patterns. ## Overview @@ -18,7 +18,7 @@ The test package is part of the Kit codebase. Import it in your extension tests: ```go import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" ) ``` @@ -32,7 +32,7 @@ package main import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" ) @@ -336,7 +336,7 @@ package main import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" ) diff --git a/internal/extensions/test/assert.go b/pkg/extensions/test/assert.go similarity index 100% rename from internal/extensions/test/assert.go rename to pkg/extensions/test/assert.go diff --git a/internal/extensions/test/harness.go b/pkg/extensions/test/harness.go similarity index 99% rename from internal/extensions/test/harness.go rename to pkg/extensions/test/harness.go index 32780810..ef177686 100644 --- a/internal/extensions/test/harness.go +++ b/pkg/extensions/test/harness.go @@ -10,7 +10,7 @@ // // import ( // "testing" -// "github.com/mark3labs/kit/internal/extensions/test" +// "github.com/mark3labs/kit/pkg/extensions/test" // ) // // func TestMyExtension(t *testing.T) { diff --git a/internal/extensions/test/harness_test.go b/pkg/extensions/test/harness_test.go similarity index 100% rename from internal/extensions/test/harness_test.go rename to pkg/extensions/test/harness_test.go diff --git a/internal/extensions/test/mock.go b/pkg/extensions/test/mock.go similarity index 100% rename from internal/extensions/test/mock.go rename to pkg/extensions/test/mock.go diff --git a/skills/kit-extensions/SKILL.md b/skills/kit-extensions/SKILL.md index 352b93da..1d327202 100644 --- a/skills/kit-extensions/SKILL.md +++ b/skills/kit-extensions/SKILL.md @@ -930,7 +930,7 @@ package main import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" ) @@ -1216,6 +1216,6 @@ func applyMode(ctx ext.Context, active bool, tools []string) { - [`internal/extensions/runner.go`](https://github.com/mark3labs/kit/blob/main/internal/extensions/runner.go) — Event dispatch and state management - [`internal/extensions/loader.go`](https://github.com/mark3labs/kit/blob/main/internal/extensions/loader.go) — Yaegi interpreter setup - [`internal/extensions/symbols.go`](https://github.com/mark3labs/kit/blob/main/internal/extensions/symbols.go) — All types exported to extensions -- [`internal/extensions/test/`](https://github.com/mark3labs/kit/tree/main/internal/extensions/test) — Testing package with harness, mocks, and assertions +- [`pkg/extensions/test/`](https://github.com/mark3labs/kit/tree/main/pkg/extensions/test) — Testing package with harness, mocks, and assertions - [`examples/extensions/tool-logger_test.go`](https://github.com/mark3labs/kit/blob/main/examples/extensions/tool-logger_test.go) — Complete test example - [`examples/extensions/`](https://github.com/mark3labs/kit/tree/main/examples/extensions) — 25+ working example extensions diff --git a/www/pages/extensions/testing.md b/www/pages/extensions/testing.md index 6a07e64c..2f06c64f 100644 --- a/www/pages/extensions/testing.md +++ b/www/pages/extensions/testing.md @@ -5,7 +5,7 @@ description: Write unit tests for your Kit extensions using the test package. # Testing Extensions -Kit provides a testing package (`github.com/mark3labs/kit/internal/extensions/test`) that enables you to write unit tests for your extensions. Tests run outside the Yaegi interpreter but load your extension code into an isolated interpreter instance, allowing you to verify behavior without running the full Kit TUI. +Kit provides a testing package (`github.com/mark3labs/kit/pkg/extensions/test`) that enables you to write unit tests for your extensions. Tests run outside the Yaegi interpreter but load your extension code into an isolated interpreter instance, allowing you to verify behavior without running the full Kit TUI. ## Overview @@ -25,7 +25,7 @@ The test package is part of the Kit codebase. Import it in your extension tests: ```go import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" ) ``` @@ -41,7 +41,7 @@ package main import ( "testing" - "github.com/mark3labs/kit/internal/extensions/test" + "github.com/mark3labs/kit/pkg/extensions/test" "github.com/mark3labs/kit/internal/extensions" )