• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teaxyz / lib / 5431029945

pending completion
5431029945

Pull #29

github

web-flow
Merge 09ae07e02 into ebed91025
Pull Request #29: rm TeaError; add specific error classes

482 of 611 branches covered (78.89%)

Branch coverage included in aggregate %.

64 of 107 new or added lines in 8 files covered. (59.81%)

2058 of 2360 relevant lines covered (87.2%)

20366.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.23
/src/utils/error.ts
1
export function panic(message?: string): never {
26✔
2
  throw new Error(message)
28✔
3
}
28✔
4

5
declare global {
6
  interface Promise<T> {
7
    swallow(err?: unknown): Promise<T | undefined>
8
  }
9
}
10

11
Promise.prototype.swallow = function(gristle?: (e: unknown) => boolean) {
26✔
12
  return this.catch((err: unknown) => {
6,383✔
NEW
13
    if (gristle && !gristle(err)) {
×
14
      throw err
×
15
    }
×
16
  })
6,383✔
17
}
26✔
18

19
export class TeaError extends Error
26✔
20
{}
26✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc