[Pkg-javascript-commits] [node-diffie-hellman] 63/88: better check for node 10

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:19:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-diffie-hellman.

commit 15025f42b4f54c5ddbd5903eae26bd70eab52411
Author: Calvin Metcalf <calvin.metcalf at gmail.com>
Date:   Mon Oct 26 17:48:31 2015 -0400

    better check for node 10
---
 test.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test.js b/test.js
index 2ef1326..589713f 100644
--- a/test.js
+++ b/test.js
@@ -6,7 +6,7 @@ var mods = [
    'modp1', 'modp2', 'modp5', 'modp14', 'modp15', 'modp16', 'modp17', 'modp18'
 ];
 function isNode10() {
-  return process.version && process.version.split('.').length === 3 && parseInt(process.version.split('.')[1], 10) <= 10;
+  return process.version && process.version.split('.').length === 3 && parseInt(process.version.split('.')[1], 10) === 10 && process.version.split('.')[0] === 'v0';
 }
  var lens = [
   2, 8, 16, 17, 18, 20, 21, 22, 64, 65, 128, 384, 512, 1024,
@@ -105,7 +105,7 @@ while (++i < 2) {
 	run(i);
 }
 function isNode10() {
-  return process.version && process.version.split('.').length === 3 && parseInt(process.version.split('.')[1], 10) <= 10;
+  return process.version && process.version.split('.').length === 3 && parseInt(process.version.split('.')[1], 10) === 10 && parseInt(process.version.split('.')[0] === 0)
 }
 if (!isNode10()) {
 	test('check errors', function (t) {
@@ -128,4 +128,4 @@ if (!isNode10()) {
 		dh2 = nodeCrypto.createDiffieHellman(p1, new Buffer([11]).toString('hex'), 'hex');
 		t.equals(dh1.verifyError, dh2.verifyError, 'same error for good prime non testable generator');
 	});
-}
\ No newline at end of file
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-diffie-hellman.git



More information about the Pkg-javascript-commits mailing list