MCPcopy
hub / github.com/grafana/k6 / TestGenElementsNullProperties

Function TestGenElementsNullProperties

js/modules/k6/html/elements_gen_test.go:369–389  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

367}
368
369func TestGenElementsNullProperties(t *testing.T) {
370 t.Parallel()
371 rt := getTestRuntimeWithDoc(t, testGenElems)
372 nullTests := []struct {
373 id string
374 property string
375 }{
376 {"audio2", "crossOrigin"},
377 {"img3", "crossOrigin"},
378 {"link2", "crossOrigin"},
379 }
380
381 for _, test := range nullTests {
382 v, err := rt.RunString(`doc.find("#` + test.id + `").get(0).` + test.property + `()`)
383 if err != nil {
384 t.Errorf("Error for property name '%s' on element id '#%s':\n%+v", test.property, test.id, err)
385 } else if v.Export() != nil {
386 t.Errorf("Expected null for property name '%s' on element id '#%s'", test.property, test.id)
387 }
388 }
389}
390
391func TestGenElementsURLProperties(t *testing.T) {
392 t.Parallel()

Callers

nothing calls this directly

Calls 3

getTestRuntimeWithDocFunction · 0.85
ErrorfMethod · 0.80
ExportMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…