Skip to content

Add tests to improve internal/crypto/pbkdf2.js coverage

I added these tests

  • Add a test of _pbkdf2 where keylen is not a number
  • Add a test of _pbkdf2 where iterations < 0

Current coverage is here: https://coverage.nodejs.org/coverage-1fa59b4c7e575ca7/root/internal/crypto/diffiehellman.js.html

I cannot write a test where PBKDF2 returns -1. I think it is coverage blockers so I create an issue (#17731 (closed)).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Merge request reports

Loading