| 223 | |
| 224 | /** Service keys (sans the e2e/ prefix) whose absence caused this failure. */ |
| 225 | const missingServices = (cause: Cause.Cause<unknown>): ReadonlyArray<string> => { |
| 226 | const rendered = String(Cause.squash(cause)); |
| 227 | return [...rendered.matchAll(/Service not found: e2e\/([^\s(]+)/g)] |
| 228 | .map((match) => match[1] ?? "") |
| 229 | .filter((name, index, all) => name !== "" && all.indexOf(name) === index); |
| 230 | }; |
| 231 | |
| 232 | const failureMessage = (cause: Cause.Cause<unknown>): string => { |
| 233 | const rendered = String(Cause.squash(cause)); |