1
0
mirror of synced 2025-11-08 21:07:23 +00:00

feat(CLI): create CLI, begin work on v2

This commit is contained in:
Jason Dreyzehner
2018-02-22 02:20:38 -05:00
parent a211a54c1f
commit 76336c88db
25 changed files with 11069 additions and 5189 deletions

View File

@@ -1,6 +1,17 @@
import { test } from 'ava'
import { sha256 } from 'typescript-starter'
import { Macro, test } from 'ava';
import { sha256, sha256Native } from './hash';
test('sha256', t => {
t.deepEqual(sha256('test'), '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08')
})
const hash: Macro = (t, input: string, expected: string) => {
t.is(sha256(input), expected);
t.is(sha256Native(input), expected);
};
hash.title = (providedTitle: string, input: string, expected: string) =>
`${providedTitle}: ${input} => ${expected}`;
test(
'sha256',
hash,
'test',
'9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08'
);