(script string, expectedResult Value, t *testing.T)
| 213 | } |
| 214 | |
| 215 | func (r *Runtime) testScriptWithTestLibX(script string, expectedResult Value, t *testing.T) { |
| 216 | _, err := r.RunProgram(testLib()) |
| 217 | if err != nil { |
| 218 | t.Fatal(err) |
| 219 | } |
| 220 | |
| 221 | _, err = r.RunProgram(testLibX()) |
| 222 | if err != nil { |
| 223 | t.Fatal(err) |
| 224 | } |
| 225 | |
| 226 | r.testScript(script, expectedResult, t) |
| 227 | } |
| 228 | |
| 229 | func (r *Runtime) testScript(script string, expectedResult Value, t *testing.T) { |
| 230 | r.testPrg(MustCompile("test.js", script, false), expectedResult, t) |
no test coverage detected