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

nikelborm / fetch-github-folder / 12804827031

16 Jan 2025 08:22AM UTC coverage: 55.394% (-1.2%) from 56.577%
12804827031

push

github

nikelborm
quick save: Thu Jan 16 11:22:57 MSK 2025

51 of 64 branches covered (79.69%)

Branch coverage included in aggregate %.

178 of 408 new or added lines in 15 files covered. (43.63%)

5 existing lines in 1 file now uncovered.

329 of 622 relevant lines covered (52.89%)

2.32 hits per line

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

78.26
/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

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

NEW
20
    if (data instanceof Readable) return data;
×
21

NEW
22
    return yield* new FailedToParseDataToReadableStream();
×
NEW
23
  });
×
24

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