summaryrefslogtreecommitdiff
path: root/js/text_encoding_test.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-03-06 20:48:46 -0500
committerGitHub <noreply@github.com>2019-03-06 20:48:46 -0500
commitc42a9d737081fb8ee768c7178dae0e1f19c0f343 (patch)
tree9ffb7e502da62793ea099c34bd7b29c8a7a19b19 /js/text_encoding_test.ts
parentde1a10e5f7afe793a66b2349642ea135fc066104 (diff)
Upgrade deno_std (#1892)
A major API change was that asserts are imported from testing/asserts.ts now rather than testing/mod.ts and assertEqual as renamed to assertEquals to conform to what is most common in JavaScript.
Diffstat (limited to 'js/text_encoding_test.ts')
-rw-r--r--js/text_encoding_test.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/text_encoding_test.ts b/js/text_encoding_test.ts
index 41df882e3..f7939499a 100644
--- a/js/text_encoding_test.ts
+++ b/js/text_encoding_test.ts
@@ -1,16 +1,16 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-import { test, assert, assertEqual } from "./test_util.ts";
+import { test, assert, assertEquals } from "./test_util.ts";
test(function atobSuccess() {
const text = "hello world";
const encoded = btoa(text);
- assertEqual(encoded, "aGVsbG8gd29ybGQ=");
+ assertEquals(encoded, "aGVsbG8gd29ybGQ=");
});
test(function btoaSuccess() {
const encoded = "aGVsbG8gd29ybGQ=";
const decoded = atob(encoded);
- assertEqual(decoded, "hello world");
+ assertEquals(decoded, "hello world");
});
test(function btoaFailed() {
@@ -22,7 +22,7 @@ test(function btoaFailed() {
err = e;
}
assert(!!err);
- assertEqual(err.name, "InvalidInput");
+ assertEquals(err.name, "InvalidInput");
});
test(function textDecoder2() {
@@ -34,13 +34,13 @@ test(function textDecoder2() {
0xf0, 0x9d, 0x93, 0xbd
]);
const decoder = new TextDecoder();
- assertEqual(decoder.decode(fixture), "𝓽𝓮𝔁𝓽");
+ assertEquals(decoder.decode(fixture), "𝓽𝓮𝔁𝓽");
});
test(function textDecoderASCII() {
const fixture = new Uint8Array([0x89, 0x95, 0x9f, 0xbf]);
const decoder = new TextDecoder("ascii");
- assertEqual(decoder.decode(fixture), "‰•Ÿ¿");
+ assertEquals(decoder.decode(fixture), "‰•Ÿ¿");
});
test(function textDecoderErrorEncoding() {
@@ -49,7 +49,7 @@ test(function textDecoderErrorEncoding() {
const decoder = new TextDecoder("foo");
} catch (e) {
didThrow = true;
- assertEqual(e.message, "The encoding label provided ('foo') is invalid.");
+ assertEquals(e.message, "The encoding label provided ('foo') is invalid.");
}
assert(didThrow);
});
@@ -58,7 +58,7 @@ test(function textEncoder2() {
const fixture = "𝓽𝓮𝔁𝓽";
const encoder = new TextEncoder();
// prettier-ignore
- assertEqual(Array.from(encoder.encode(fixture)), [
+ assertEquals(Array.from(encoder.encode(fixture)), [
0xf0, 0x9d, 0x93, 0xbd,
0xf0, 0x9d, 0x93, 0xae,
0xf0, 0x9d, 0x94, 0x81,