MCPcopy Index your code
hub / github.com/Effect-TS/effect / simplifyStackTrace

Function simplifyStackTrace

packages/effect/test/Cause.test.ts:943–957  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

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) => {

Callers 1

Cause.test.tsFile · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected