MCPcopy Index your code
hub / github.com/nodejs/node / get_asserts_output

Function get_asserts_output

test/fixtures/wpt/resources/testharness.js:4540–4566  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

4538 });
4539
4540 function get_asserts_output(test) {
4541 const asserts_output = render(
4542 ["details", {},
4543 ["summary", {}, "Asserts run"],
4544 ["table", {}, ""] ]);
4545
4546 var asserts = asserts_run_by_test.get(test);
4547 if (!asserts) {
4548 asserts_output.querySelector("summary").insertAdjacentText("afterend", "No asserts ran");
4549 return asserts_output;
4550 }
4551
4552 const table = asserts_output.querySelector("table");
4553 for (const assert of asserts) {
4554 const status_class_name = status_class(Test.prototype.status_formats[assert.status]);
4555 var output_fn = "(" + assert.args.join(", ") + ")";
4556 if (assert.stack) {
4557 output_fn += "\n";
4558 output_fn += assert.stack.split("\n", 1)[0].replace(/@?\w+:\/\/[^ "\/]+(?::\d+)?/g, " ");
4559 }
4560 table.appendChild(render(
4561 ["tr", {"class":"overall-" + status_class_name},
4562 ["td", {"class":status_class_name}, Test.prototype.status_formats[assert.status]],
4563 ["td", {}, ["pre", {}, ["strong", {}, assert.assert_name], output_fn]] ]));
4564 }
4565 return asserts_output;
4566 }
4567
4568 var assertions = has_assertions();
4569 const section = render(

Callers 1

testharness.jsFile · 0.85

Calls 5

renderFunction · 0.70
status_classFunction · 0.70
getMethod · 0.65
joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…