docs(services): add test markers to credential functions

In `credential.service.ts`, markers were added to functions `getHashFromPassword` and `comparePassword` to indicate necessity for testing. This provides clear indications for developers about which functions require tests to be written or updated.

Signed-off-by: Mathis <yidhra@tuta.io>
This commit is contained in:
Mathis H (Avnyr) 2024-04-25 14:54:17 +02:00
parent cd51a04aba
commit da001bf7cc
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

View File

@ -1,6 +1,6 @@
import Argon2id from "@node-rs/argon2";
//ToTest
export async function getHashFromPassword(password: string) {
return await Argon2id.hash(password,{
secret: Buffer.from(`${process.env["HASH_SECRET"]}`),
@ -8,6 +8,7 @@ export async function getHashFromPassword(password: string) {
})
}
//ToTest
export async function comparePassword(password: string, hash: string) {
return await Argon2id.verify(hash, password, {
secret: Buffer.from(`${process.env["HASH_SECRET"]}`),