mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 13:05:07 +00:00

The motivation for this commit is to pick up early on missing checks for crypto support (when Node is built --without-ssl). There are currently usages of common.hasCrypto which are not just for detecting if crypto support is available and then skip the test in question. For these case we still want to have a lint error generated which can then be disabled using an ESLint comment. PR-URL: https://github.com/nodejs/node/pull/13813 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
9 lines
238 B
JavaScript
9 lines
238 B
JavaScript
// The --expose-http2 flag is not set
|
|
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
assert.throws(() => require('http2'), // eslint-disable-line crypto-check
|
|
/^Error: Cannot find module 'http2'$/);
|