(resultsTree, domParent)
| 415 | } |
| 416 | |
| 417 | function summaryList(resultsTree, domParent) { |
| 418 | let specListNode |
| 419 | for (let i = 0; i < resultsTree.children.length; i++) { |
| 420 | const resultNode = resultsTree.children[i] |
| 421 | if (filterSpecs && !hasActiveSpec(resultNode)) { |
| 422 | continue |
| 423 | } |
| 424 | if (resultNode.type === "suite") { |
| 425 | const suiteListNode = createDom( |
| 426 | "ul", |
| 427 | { className: "jasmine-suite", id: "suite-" + resultNode.result.id }, |
| 428 | createDom( |
| 429 | "li", |
| 430 | { |
| 431 | className: "jasmine-suite-detail jasmine-" + resultNode.result.status, |
| 432 | }, |
| 433 | createDom("a", { href: specHref(resultNode.result) }, resultNode.result.description) |
| 434 | ) |
| 435 | ) |
| 436 | |
| 437 | summaryList(resultNode, suiteListNode) |
| 438 | domParent.appendChild(suiteListNode) |
| 439 | } |
| 440 | if (resultNode.type === "spec") { |
| 441 | if (domParent.getAttribute("class") !== "jasmine-specs") { |
| 442 | specListNode = createDom("ul", { className: "jasmine-specs" }) |
| 443 | domParent.appendChild(specListNode) |
| 444 | } |
| 445 | let specDescription = resultNode.result.description |
| 446 | if (noExpectations(resultNode.result)) { |
| 447 | specDescription = "SPEC HAS NO EXPECTATIONS " + specDescription |
| 448 | } |
| 449 | if (resultNode.result.status === "pending" && resultNode.result.pendingReason !== "") { |
| 450 | specDescription = specDescription + " PENDING WITH MESSAGE: " + resultNode.result.pendingReason |
| 451 | } |
| 452 | specListNode.appendChild( |
| 453 | createDom( |
| 454 | "li", |
| 455 | { |
| 456 | className: "jasmine-" + resultNode.result.status, |
| 457 | id: "spec-" + resultNode.result.id, |
| 458 | }, |
| 459 | createDom("a", { href: specHref(resultNode.result) }, specDescription) |
| 460 | ) |
| 461 | ) |
| 462 | } |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | function optionsMenu(config) { |
| 467 | const optionsMenuDom = createDom( |
no test coverage detected