MCPcopy Create free account
hub / github.com/dop251/goja / testScriptWithTestLib

Method testScriptWithTestLib

compiler_test.go:206–213  ·  view source on GitHub ↗
(script string, expectedResult Value, t *testing.T)

Source from the content-addressed store, hash-verified

204}
205
206func (r *Runtime) testScriptWithTestLib(script string, expectedResult Value, t *testing.T) {
207 _, err := r.RunProgram(testLib())
208 if err != nil {
209 t.Fatal(err)
210 }
211
212 r.testScript(script, expectedResult, t)
213}
214
215func (r *Runtime) testScriptWithTestLibX(script string, expectedResult Value, t *testing.T) {
216 _, err := r.RunProgram(testLib())

Callers 15

TestGoMapWithProtoFunction · 0.80
TestGoMapProtoPropFunction · 0.80
TestGoMapProtoPropChainFunction · 0.80
TestGoSliceReflectProtoFunction · 0.80
TestWrappedFuncFunction · 0.80
TestGoReflectStructFieldFunction · 0.80
TestGoReflectWithProtoFunction · 0.80

Calls 3

RunProgramMethod · 0.95
testScriptMethod · 0.95
testLibFunction · 0.85

Tested by

no test coverage detected