MCPcopy
hub / github.com/js-cookie/js-cookie / getSummary

Function getSummary

test/browserstack/runner.js:7–27  ·  view source on GitHub ↗
(report)

Source from the content-addressed store, hash-verified

5const TEST_TIMEOUT_MS = 5 * 60 * 1000
6
7function getSummary(report) {
8 const counts = report.testCounts || {}
9 const tests = Array.isArray(report.tests) ? report.tests : []
10
11 if (tests.length > 0) {
12 const failed = tests.filter((test) => test.status === 'failed').length
13 const passed = tests.filter((test) => test.status === 'passed').length
14
15 return {
16 failed,
17 passed,
18 total: tests.length
19 }
20 }
21
22 return {
23 failed: Number(counts.failed || 0),
24 passed: Number(counts.passed || 0),
25 total: Number(counts.total || 0)
26 }
27}
28
29function getFailedTests(tests) {
30 return tests

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…