summaryrefslogtreecommitdiff
path: root/js/text_encoding_test.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-04-21 16:40:10 -0400
committerGitHub <noreply@github.com>2019-04-21 16:40:10 -0400
commit9dfebbc9496138efbeedc431068f41662c780f3e (patch)
treec3718c3dc132d11c08c8fc18933daebf886bf787 /js/text_encoding_test.ts
parent6cded14bdf313762956d4d5361cfe8115628b535 (diff)
Fix eslint warnings (#2151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
Diffstat (limited to 'js/text_encoding_test.ts')
-rw-r--r--js/text_encoding_test.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/js/text_encoding_test.ts b/js/text_encoding_test.ts
index d33537b4f..f015a9452 100644
--- a/js/text_encoding_test.ts
+++ b/js/text_encoding_test.ts
@@ -1,19 +1,19 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test, assert, assertEquals } from "./test_util.ts";
-test(function atobSuccess() {
+test(function atobSuccess(): void {
const text = "hello world";
const encoded = btoa(text);
assertEquals(encoded, "aGVsbG8gd29ybGQ=");
});
-test(function btoaSuccess() {
+test(function btoaSuccess(): void {
const encoded = "aGVsbG8gd29ybGQ=";
const decoded = atob(encoded);
assertEquals(decoded, "hello world");
});
-test(function btoaFailed() {
+test(function btoaFailed(): void {
const text = "你好";
let err;
try {
@@ -25,7 +25,7 @@ test(function btoaFailed() {
assertEquals(err.name, "InvalidInput");
});
-test(function textDecoder2() {
+test(function textDecoder2(): void {
// prettier-ignore
const fixture = new Uint8Array([
0xf0, 0x9d, 0x93, 0xbd,
@@ -37,13 +37,13 @@ test(function textDecoder2() {
assertEquals(decoder.decode(fixture), "𝓽𝓮𝔁𝓽");
});
-test(function textDecoderASCII() {
+test(function textDecoderASCII(): void {
const fixture = new Uint8Array([0x89, 0x95, 0x9f, 0xbf]);
const decoder = new TextDecoder("ascii");
assertEquals(decoder.decode(fixture), "‰•Ÿ¿");
});
-test(function textDecoderErrorEncoding() {
+test(function textDecoderErrorEncoding(): void {
let didThrow = false;
try {
new TextDecoder("foo");
@@ -54,7 +54,7 @@ test(function textDecoderErrorEncoding() {
assert(didThrow);
});
-test(function textEncoder2() {
+test(function textEncoder2(): void {
const fixture = "𝓽𝓮𝔁𝓽";
const encoder = new TextEncoder();
// prettier-ignore
@@ -66,7 +66,7 @@ test(function textEncoder2() {
]);
});
-test(function textDecoderSharedUint8Array() {
+test(function textDecoderSharedUint8Array(): void {
const ab = new SharedArrayBuffer(6);
const dataView = new DataView(ab);
const charCodeA = "A".charCodeAt(0);
@@ -79,7 +79,7 @@ test(function textDecoderSharedUint8Array() {
assertEquals(actual, "ABCDEF");
});
-test(function textDecoderSharedInt32Array() {
+test(function textDecoderSharedInt32Array(): void {
const ab = new SharedArrayBuffer(8);
const dataView = new DataView(ab);
const charCodeA = "A".charCodeAt(0);
@@ -92,7 +92,7 @@ test(function textDecoderSharedInt32Array() {
assertEquals(actual, "ABCDEFGH");
});
-test(function toStringShouldBeWebCompatibility() {
+test(function toStringShouldBeWebCompatibility(): void {
const encoder = new TextEncoder();
assertEquals(encoder.toString(), "[object TextEncoder]");