feat: add unit test for hash function

This commit is contained in:
Joe Previte 2021-05-19 14:11:08 -07:00
parent 17be8c5cd3
commit f35120c0a3
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -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)
})
})