Skip to content

Commit 014f1c2

Browse files
committed
feat: add unit test for hash function
1 parent e29905b commit 014f1c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/unit/node/util.test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { hash } from "../../../src/node/util"
2+
13
describe("getEnvPaths", () => {
24
describe("on darwin", () => {
35
let ORIGINAL_PLATFORM = ""
@@ -145,3 +147,11 @@ describe("getEnvPaths", () => {
145147
})
146148
})
147149
})
150+
151+
describe("hash", () => {
152+
it("should return a hash of the string passed in", () => {
153+
const plainTextPassword = "mySecretPassword123"
154+
const hashed = hash(plainTextPassword)
155+
expect(hashed).not.toBe(plainTextPassword)
156+
})
157+
})

0 commit comments

Comments
 (0)