Skip to content

Conversation

@cruzz77
Copy link
Contributor

@cruzz77 cruzz77 commented Dec 27, 2025

This PR updates test/parallel/test-crypto-no-algorithm.js to align with the ongoing test cleanup and modernization work across the Node.js codebase.

As part of recent efforts, tests are being standardized to avoid using RegExp.prototype.test() directly inside assertions in favor of clearer, more explicit matching patterns. This change applies that same approach to a crypto test that validates OpenSSL error output.

What was changed

Previously:

assert(
  err.opensslErrorStack.some((msg) => expected.test(msg)),
  `did not find ${expected} in ${err.opensslErrorStack}`
);

Updated to:

assert(
  err.opensslErrorStack.some((msg) => msg.match(expected)),
  `did not find ${expected} in ${err.opensslErrorStack}`
);

Why this change

  • Aligns the test with modern Node.js assertion patterns used elsewhere in the test suite
  • Improves readability by expressing intent as string matching rather than invoking RegExp.prototype.test()
  • Keeps assertion style consistent with recent test modernizations

Additional notes

  • No functional or behavioral changes are intended
  • Test logic, coverage, and failure messages remain unchanged
  • All tests continue to pass

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Dec 27, 2025
@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (15bdf38) to head (1e76a99).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61183      +/-   ##
==========================================
- Coverage   88.53%   88.53%   -0.01%     
==========================================
  Files         703      703              
  Lines      208598   208598              
  Branches    40227    40221       -6     
==========================================
- Hits       184674   184673       -1     
+ Misses      15951    15950       -1     
- Partials     7973     7975       +2     

see 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants