MCPcopy
hub / github.com/bnb-chain/bsc / TestPreload

Function TestPreload

console/console_test.go:224–232  ·  view source on GitHub ↗

Tests that preloaded JavaScript files have been executed before user is given input.

(t *testing.T)

Source from the content-addressed store, hash-verified

222// Tests that preloaded JavaScript files have been executed before user is given
223// input.
224func TestPreload(t *testing.T) {
225 tester := newTester(t, nil)
226 defer tester.Close(t)
227
228 tester.console.Evaluate("preloaded")
229 if output := tester.output.String(); !strings.Contains(output, "some-preloaded-string") {
230 t.Fatalf("preloaded variable missing: have %s, want %s", output, "some-preloaded-string")
231 }
232}
233
234// Tests that the JavaScript objects returned by statement executions are properly
235// pretty printed instead of just displaying "[object]".

Callers

nothing calls this directly

Calls 6

newTesterFunction · 0.70
CloseMethod · 0.65
StringMethod · 0.65
ContainsMethod · 0.65
EvaluateMethod · 0.45
FatalfMethod · 0.45

Tested by

no test coverage detected