From f35120c0a346b2a85903fef35c78cab778846876 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 19 May 2021 14:11:08 -0700 Subject: [PATCH] feat: add unit test for hash function --- test/unit/node/util.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/node/util.test.ts b/test/unit/node/util.test.ts index bb1884b9..0b085f09 100644 --- a/test/unit/node/util.test.ts +++ b/test/unit/node/util.test.ts @@ -1,3 +1,5 @@ +import { hash } from "../../../src/node/util" + describe("getEnvPaths", () => { describe("on darwin", () => { let ORIGINAL_PLATFORM = "" @@ -145,3 +147,11 @@ describe("getEnvPaths", () => { }) }) }) + +describe("hash", () => { + it("should return a hash of the string passed in", () => { + const plainTextPassword = "mySecretPassword123" + const hashed = hash(plainTextPassword) + expect(hashed).not.toBe(plainTextPassword) + }) +})