1
0
Fork 0

Updated dev tools

This commit is contained in:
Michaël Lemaire 2020-05-13 14:22:56 +02:00
parent c8c957480d
commit fdb9e86d9d
7 changed files with 26 additions and 7 deletions

9
.editorconfig Normal file
View File

@ -0,0 +1,9 @@
root = true
[*.{ts,json}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

4
.gitignore vendored
View File

@ -1 +1,3 @@
.config.json
deno.d.ts
.vscode
.local

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# typescript/passwordhash
[![Build Status](https://thunderk.visualstudio.com/typescript/_apis/build/status/passwordhash?branchName=master)](https://dev.azure.com/thunderk/typescript/_build?pipelineNameFilter=passwordhash)

1
deps.test.ts Normal file
View File

@ -0,0 +1 @@
export * from "https://code.thunderk.net/typescript/deno_tools/raw/1.0.0/testing.ts";

View File

@ -1,7 +1,9 @@
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { test, expect } from "./deps.test.ts";
import { Hasher, HashOutputMode } from "./hashing.ts";
Deno.test("hasher", () => {
const assertEquals = (a: any, b: any) => expect(a).toEqual(b);
test("hasher", () => {
assertEquals(Hasher.tagFromURL(""), null);
assertEquals(Hasher.tagFromURL("http://"), null);
assertEquals(Hasher.tagFromURL("http://localhost"), "localhost");

View File

@ -1,7 +1,7 @@
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { test, expect } from "./deps.test.ts";
import { hex_sha1 } from "./sha.ts";
Deno.test("sha1", () => {
assertEquals(hex_sha1("abc"), "a9993e364706816aba3e25717850c26c9cd0d89d");
assertEquals(hex_sha1("test"), "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3");
test("sha1", () => {
expect(hex_sha1("abc")).toEqual("a9993e364706816aba3e25717850c26c9cd0d89d");
expect(hex_sha1("test")).toEqual("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3");
});

View File

@ -1,5 +1,7 @@
{
"compilerOptions": {
"module": "esnext",
"target": "ESNext",
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,