From 77ed66b24ddcf4184ba579271728e6a2ba87b7dc Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sat, 31 May 2014 11:28:00 +1000 Subject: [PATCH] ECKey: ensure throw is from ECKey --- test/eckey.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/eckey.js b/test/eckey.js index 34ce21a..7d17416 100644 --- a/test/eckey.js +++ b/test/eckey.js @@ -31,8 +31,10 @@ describe('ECKey', function() { fixtures.invalid.constructor.forEach(function(f) { it('throws on ' + f.D, function() { + var D = new BigInteger(f.D) + assert.throws(function() { - new ECKey(new BigInteger(f.D)) + new ECKey(D) }, new RegExp(f.exception)) }) })