fix(op_crates/web): TextEncoder should return error message with original input (#8005)

This commit is contained in:
aca 2020-10-20 20:47:38 +09:00 committed by GitHub
parent d9ae74019e
commit 9cf06f76fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -163,10 +163,10 @@ function textDecoderASCII() {
function textDecoderErrorEncoding() {
let didThrow = false;
try {
new TextDecoder("foo");
new TextDecoder("Foo");
} catch (e) {
didThrow = true;
assert(e.message === "The encoding label provided ('foo') is invalid.");
assert(e.message === "The encoding label provided ('Foo') is invalid.");
}
assert(didThrow);
}