MCPcopy
hub / github.com/codeceptjs/CodeceptJS / groupBySuite

Function groupBySuite

lib/plugin/junitReporter.js:255–268  ·  view source on GitHub ↗
(tests)

Source from the content-addressed store, hash-verified

253}
254
255function groupBySuite(tests) {
256 const groups = []
257 const byKey = new Map()
258 for (const test of tests) {
259 const key = test.parent || test
260 if (!byKey.has(key)) {
261 const list = []
262 byKey.set(key, list)
263 groups.push(list)
264 }
265 byKey.get(key).push(test)
266 }
267 return groups
268}
269
270function skipReason(test) {
271 if (test.opts && test.opts.skipInfo && test.opts.skipInfo.message) return test.opts.skipInfo.message

Callers 1

buildXmlFunction · 0.85

Calls 2

pushMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected