Skip to content

Commit 2da3de6

Browse files
committed
fix: add
1 parent a65ea67 commit 2da3de6

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ This project "fixes" the following global APIs, overriding whichever polyfills t
4343
- `URL`
4444
- `URLSearchParams`
4545
- `BroadcastChannel`
46+
- `TransformStream`
4647

4748
## Getting started
4849

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class FixedJSDOMEnvironment extends JSDOMEnvironment {
2121
this.global.URLSearchParams = URLSearchParams
2222

2323
this.global.BroadcastChannel = BroadcastChannel
24+
this.global.TransformStream = TransformStream
2425
}
2526
}
2627

index.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,9 @@ test('exposes "BroadcastChannel"', () => {
163163
expect(channel).toBeInstanceOf(BuiltinBroadcastChannel)
164164
channel.unref()
165165
})
166+
167+
test('exposes "TransformStream"', () => {
168+
expect(globalThis).toHaveProperty('TransformStream')
169+
const channel = new TransformStream()
170+
expect(channel).toBeInstanceOf(TransformStream)
171+
})

0 commit comments

Comments
 (0)