15 lines
249 B
Go
15 lines
249 B
Go
|
|
package jsmod_test
|
||
|
|
|
||
|
|
import (
|
||
|
|
"apigo.cc/go/jsmod"
|
||
|
|
"testing"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestRegister(t *testing.T) {
|
||
|
|
jsmod.Register("test", map[string]any{"foo": "bar"})
|
||
|
|
mods := jsmod.GetModules()
|
||
|
|
if mods["test"]["foo"] != "bar" {
|
||
|
|
t.Error("Register failed")
|
||
|
|
}
|
||
|
|
}
|