MCPcopy
hub / github.com/gopherjs/gopherjs / TestUndefinedInternalization

Function TestUndefinedInternalization

tests/js_test.go:432–440  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

430}
431
432func TestUndefinedInternalization(t *testing.T) {
433 undefinedEqualsJsUndefined := func(i any) bool {
434 return i == js.Undefined
435 }
436 js.Global.Set("undefinedEqualsJsUndefined", undefinedEqualsJsUndefined)
437 if !js.Global.Call("eval", "(undefinedEqualsJsUndefined(undefined))").Bool() {
438 t.Fail()
439 }
440}
441
442func TestSameFuncWrapper(t *testing.T) {
443 a := func(_ string) {} // string argument to force wrapping

Callers

nothing calls this directly

Calls 3

SetMethod · 0.45
BoolMethod · 0.45
CallMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…