feat: add unit test for hash function
This commit is contained in:
parent
17be8c5cd3
commit
f35120c0a3
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue