summaryrefslogtreecommitdiff
path: root/test/parallel/test-buffer-concat.js
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2017-06-20 08:30:47 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2017-08-30 18:02:58 -0300
commit50ebac112429c4a8cf9438dac9d832530465d2bb (patch)
tree6f635f9d7c97251a16dd49afcfbc44fe214c6788 /test/parallel/test-buffer-concat.js
parented1ba4580b4abdc38047f4f74ab79ba0b71f3da4 (diff)
downloadandroid-node-v8-50ebac112429c4a8cf9438dac9d832530465d2bb.tar.gz
android-node-v8-50ebac112429c4a8cf9438dac9d832530465d2bb.tar.bz2
android-node-v8-50ebac112429c4a8cf9438dac9d832530465d2bb.zip
tools: add eslint rule for hasCrypto checking
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>
Diffstat (limited to 'test/parallel/test-buffer-concat.js')
-rw-r--r--test/parallel/test-buffer-concat.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js
index 9f3acbc599..87ccb720b7 100644
--- a/test/parallel/test-buffer-concat.js
+++ b/test/parallel/test-buffer-concat.js
@@ -62,6 +62,7 @@ function assertWrongList(value) {
}));
}
+// eslint-disable-next-line crypto-check
const random10 = common.hasCrypto ?
require('crypto').randomBytes(10) :
Buffer.alloc(10, 1);