test: refactor test-crypto-pbkdf2
This simplifies the test case by introducing a helper function that simply verifies that the sync and async variants produce the same result.
Also, testPBKDF2
did not use mustCall()
/mustSucceed()
, so it would not fail if the callback was never called.
This effectively also changes the loose mustCall()
check at the end of the file to the stricter mustSucceed()
function.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines