MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / newTestPlugin

Function newTestPlugin

internal/plugins/plugins_test.go:29–34  ·  view source on GitHub ↗

newTestPlugin returns a Plugin with testFS attached, constructed directly to avoid touching the package-level registry.

(t *testing.T)

Source from the content-addressed store, hash-verified

27// newTestPlugin returns a Plugin with testFS attached, constructed directly
28// to avoid touching the package-level registry.
29func newTestPlugin(t *testing.T) *Plugin {
30 t.Helper()
31 p := &Plugin{name: "testplugin", version: "1.0"}
32 require.NoError(t, p.AttachFileSystem(testFS))
33 return p
34}
35
36// withRegistryPlugin temporarily installs a single test plugin into the
37// package-level registry and restores the original state on cleanup.

Calls 1

AttachFileSystemMethod · 0.95

Tested by

no test coverage detected