Skip to content

Commit f029fc1

Browse files
committed
test(bcrypt): fix verify test
1 parent 9be8e9a commit f029fc1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,14 @@
4242
"nyc": "^15.1.0",
4343
"prettier": "^2.1.1",
4444
"putasset": "^5.0.3",
45-
"tsconfig-paths": "^3.9.0",
4645
"typescript": "^4.0.2"
4746
},
4847
"optionalDependencies": {
4948
"@swc-node/core-linux-musl": "^0.5.0"
5049
},
5150
"ava": {
5251
"extensions": ["ts"],
53-
"require": ["@swc-node/register", "tsconfig-paths/register"],
52+
"require": ["@swc-node/register"],
5453
"files": ["packages/**/*.spec.ts"]
5554
},
5655
"lint-staged": {

packages/bcrypt/__tests__/bcrypt.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { hashSync } = require('bcrypt')
66

77
const fx = Buffer.from('bcrypt-test-password')
88

9-
const hashedPassword = hashSync(fx)
9+
const hashedPassword = hashSync(fx.toString('utf8'), 10)
1010

1111
test('verifySync hashed password from bcrypt should be true', (t) => {
1212
t.true(verifySync(fx, hashedPassword))

0 commit comments

Comments
 (0)