Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca8c48b

Browse files
committed
feat: add unit test for hash function
1 parent 1f7f92a commit ca8c48b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎test/unit/node/util.test.ts‎

Lines changed: 10 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /