From 74f4be962e7b42e888a63e72f53c20c8979ac6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 2 Dec 2020 22:04:53 +0100 Subject: [PATCH] Updated devtools --- deps.test.ts | 2 +- hashing.test.ts | 4 ++-- sha.test.ts | 4 ++-- sha.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deps.test.ts b/deps.test.ts index 0ad5f7d..c973a09 100644 --- a/deps.test.ts +++ b/deps.test.ts @@ -1 +1 @@ -export * from "https://code.thunderk.net/typescript/devtools/raw/1.0.0/testing.ts"; +export * from "https://code.thunderk.net/typescript/devtools/raw/1.2.2/testing.ts"; diff --git a/hashing.test.ts b/hashing.test.ts index 3168297..78188af 100644 --- a/hashing.test.ts +++ b/hashing.test.ts @@ -1,9 +1,9 @@ -import { test, expect } from "./deps.test.ts"; +import { expect, it } from "./deps.test.ts"; import { Hasher, HashOutputMode } from "./hashing.ts"; const assertEquals = (a: any, b: any) => expect(a).toEqual(b); -test("hasher", () => { +it("hasher", () => { assertEquals(Hasher.tagFromURL(""), null); assertEquals(Hasher.tagFromURL("http://"), null); assertEquals(Hasher.tagFromURL("http://localhost"), "localhost"); diff --git a/sha.test.ts b/sha.test.ts index 136e7fe..515676c 100644 --- a/sha.test.ts +++ b/sha.test.ts @@ -1,7 +1,7 @@ -import { test, expect } from "./deps.test.ts"; +import { expect, it } from "./deps.test.ts"; import { hex_sha1 } from "./sha.ts"; -test("sha1", () => { +it("sha1", () => { expect(hex_sha1("abc")).toEqual("a9993e364706816aba3e25717850c26c9cd0d89d"); expect(hex_sha1("test")).toEqual("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"); }); diff --git a/sha.ts b/sha.ts index a693604..1d85c40 100644 --- a/sha.ts +++ b/sha.ts @@ -162,8 +162,8 @@ function str2binb(str: string): number[] { /* SC - Get rid of warnings */ for (var i = 0; i < str.length * chrsz; i += chrsz) { if (bin[i >> 5] != undefined) { - bin[i >> 5] |= - (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i % 32); + bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << + (32 - chrsz - i % 32); } else { bin[i >> 5] = (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i % 32); }