Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: ignore catch block when requiring crypto module #2901

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tests: ignore catch block when requiring crypto module
  • Loading branch information
Uzlopak committed Mar 2, 2024
commit d7c2ee29ab261032de5582103780f06a7aebd50c
4 changes: 2 additions & 2 deletions lib/web/fetch/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const { isUint8Array } = require('node:util/types')
const { webidl } = require('./webidl')

// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
/** @type {import('crypto')|undefined} */
/** @type {import('crypto')} */
let crypto

try {
crypto = require('node:crypto')
/* c8 ignore next 3 */
} catch {

}
Expand Down
1 change: 1 addition & 0 deletions lib/web/websocket/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const { kHeadersList } = require('../../core/symbols')
let crypto
try {
crypto = require('node:crypto')
/* c8 ignore next 3 */
} catch {

}
Expand Down
1 change: 1 addition & 0 deletions lib/web/websocket/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { maxUnsigned16Bit } = require('./constants')
let crypto
try {
crypto = require('node:crypto')
/* c8 ignore next 3 */
} catch {

}
Expand Down
Loading