Skip to content

Enhance crypto/sig.js coverage

I added these case:

  1. Call Sign without new
  2. Call Verify without new
  3. Call Verify#verify with options.padding !== options.padding >> 0
  4. Call Verify#verify with options.saltLength !== options.saltLength >> 0

Current coverage: https://coverage.nodejs.org/coverage-06e1b0386196f8f8/root/internal/crypto/sig.js.html

After this PR: crypto/sig.js become 100% covered even in branch coverage.

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