| 941 | |
| 942 | describe("pretty", () => { |
| 943 | const simplifyStackTrace = (s: string): Array<string> => { |
| 944 | return Arr.filterMap(s.split("\n"), (s) => { |
| 945 | const t = s.trimStart() |
| 946 | if (t === "}") { |
| 947 | return Option.none() |
| 948 | } |
| 949 | if (t.startsWith("at [")) { |
| 950 | return Option.some(t.substring(0, t.indexOf("] ") + 1)) |
| 951 | } |
| 952 | if (t.startsWith("at ")) { |
| 953 | return Option.none() |
| 954 | } |
| 955 | return Option.some(t) |
| 956 | }) |
| 957 | } |
| 958 | |
| 959 | describe("renderErrorCause: false", () => { |
| 960 | const expectPretty = <E>(cause: Cause.Cause<E>, expected: string | undefined) => { |