Commit 016be86
committed
v2.4.0 follow-up: drop ReadableStream global polyfill, scope it to the spec
The original v2.4.0 spec drove sha256Stream(blob) via a fake-blob whose
.stream() returned 'new ReadableStream(...)'. That required the test
setup to polyfill ReadableStream/WritableStream/TransformStream onto the
jsdom global object -- five new globals just for one new test file.
Restructure: import { ReadableStream } from 'node:stream/web' directly
inside the spec, scoped to the test file. The fake-blob still emits real
WHATWG ReadableStream chunks, sha256Stream(blob) still drives the same
.getReader() path production code uses in real browsers, and we do it
in BOTH node and jsdom (55 tests, zero skips, zero global polyfills).
The browser setup is back to its pre-v2.4.0 polyfill set.1 parent 83172a8 commit 016be86
2 files changed
Lines changed: 12 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 19 | | |
25 | 20 | | |
26 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
0 commit comments