MCPcopy Index your code
hub / github.com/pocketbase/pocketbase / TestBindCoreReaderToString

Function TestBindCoreReaderToString

plugins/jsvm/binds_test.go:72–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestBindCoreReaderToString(t *testing.T) {
73 vm := goja.New()
74 BindCore(vm)
75 vm.Set("reader", strings.NewReader("test"))
76
77 _, err := vm.RunString(`
78 let result = readerToString(reader)
79
80 if (result != "test") {
81 throw new Error('Expected "test", got ' + result);
82 }
83 `)
84 if err != nil {
85 t.Fatal(err)
86 }
87}
88
89func TestBindCoreToString(t *testing.T) {
90 vm := goja.New()

Callers

nothing calls this directly

Calls 3

BindCoreFunction · 0.85
NewReaderMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…