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

nikelborm / fetch-github-folder / 12721107228

11 Jan 2025 04:15AM UTC coverage: 56.192% (-0.8%) from 57.003%
12721107228

push

github

nikelborm
save

45 of 56 branches covered (80.36%)

Branch coverage included in aggregate %.

104 of 129 new or added lines in 6 files covered. (80.62%)

10 existing lines in 2 files now uncovered.

318 of 590 relevant lines covered (53.9%)

2.7 hits per line

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

72.0
/src/parseToReadableStream.ts
1
import { Effect, gen } from 'effect/Effect';
1✔
2
import { Readable } from 'node:stream';
3
import { ReadableStream } from 'node:stream/web'
4
import { TaggedErrorVerifyingCause } from './TaggedErrorVerifyingCause.js';
5

6
export const ParseToReadableStream = <E, R>(self: Effect<unknown, E, R>) =>
1✔
7
  gen(function* () {
3✔
8
    const data = yield* self;
3✔
9

10
    if (data instanceof ArrayBuffer || data instanceof Buffer)
3✔
11
      return new Readable({
3✔
12
        read() {
3✔
13
          this.push(data);
3✔
14
          this.push(null);
3✔
15
        }
3✔
16
      });
3!
17

UNCOV
18
    if (data instanceof ReadableStream)
×
19
      return Readable.fromWeb(data);
×
20

UNCOV
21
    if (data instanceof Readable)
×
UNCOV
22
      return data;
×
23

UNCOV
24
    return yield * new FailedToParseDataToReadableStream()
×
UNCOV
25
  })
×
26

27
export class FailedToParseDataToReadableStream extends TaggedErrorVerifyingCause()(
1✔
28
  'FailedToParseDataToReadableStream',
1✔
29
  'Failed to parse data to readable stream',
1✔
30
) {}
1✔
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