(tests)
| 253 | } |
| 254 | |
| 255 | function 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 | |
| 270 | function skipReason(test) { |
| 271 | if (test.opts && test.opts.skipInfo && test.opts.skipInfo.message) return test.opts.skipInfo.message |