From 465b5772763ccb8d4970d4c55e30a518abb7be3e Mon Sep 17 00:00:00 2001 From: Ricardo Cino Date: Sun, 26 Jun 2022 01:26:19 +0200 Subject: chore: moved tests to ./test directory (#366) * chore: allow coverage to be generated from non-tested files --- src/helpers/password-helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/helpers/password-helpers.ts') diff --git a/src/helpers/password-helpers.ts b/src/helpers/password-helpers.ts index 053321bbf..d5f2d0c49 100644 --- a/src/helpers/password-helpers.ts +++ b/src/helpers/password-helpers.ts @@ -1,10 +1,10 @@ import { createHash, BinaryLike } from 'crypto'; -export function hash(password: BinaryLike) { +export function hash(password: BinaryLike): string { return createHash('sha256').update(password).digest('base64'); } -export function scorePassword(password: string) { +export function scorePassword(password: string): number { let score = 0; if (!password) { return score; -- cgit v1.2.3-54-g00ecf