-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from jridgewell/textdecoder-bug
fix: make `Uint8Array` available for `TextDecoder`
- Loading branch information
Showing
4 changed files
with
179 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { TextDecoder } from '../encoding' | ||
|
||
test('TextDecoder', () => { | ||
const input = new Uint8Array([ | ||
101, 100, 103, 101, 45, 112, 105, 110, 103, 46, 118, 101, 114, 99, 101, 108, | ||
46, 97, 112, 112, | ||
]) | ||
|
||
const utf8Decoder = new TextDecoder('utf-8', { ignoreBOM: true }) | ||
const output = utf8Decoder.decode(input) | ||
expect(output).toBe('edge-ping.vercel.app') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { URL } from '../url' | ||
|
||
test('URL', async () => { | ||
const url = new URL('https://edge-ping.vercel.app/') | ||
expect(typeof url).toBe('object') | ||
expect(url.toString()).toBe('https://edge-ping.vercel.app/') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50bdb9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
edge-runtime – ./
edge-runtime.vercel.app
edge-runtime-git-main.vercel.sh
edge-runtime.vercel.sh