diff --git a/package.json b/package.json index a696033..6d6b524 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "bn.js": "^4.11.8", "bs58": "^4.0.0", "dhttp": "^2.5.0", - "hoodwink": "^1.0.0", + "hoodwink": "^2.0.0", "minimaldata": "^1.0.2", "mocha": "^5.2.0", "nyc": "^11.8.0", diff --git a/test/ecpair.js b/test/ecpair.js index 8a246f1..78223ca 100644 --- a/test/ecpair.js +++ b/test/ecpair.js @@ -187,8 +187,8 @@ describe('ECPair', function () { }) it('loops until d is within interval [1, n) : 1', hoodwink(function () { - const rng = this.stub(function f () { - if (f.calls === 0) return ZERO // 0 + const rng = this.stub(function () { + if (rng.calls === 0) return ZERO // 0 return ONE // >0 }, 2) @@ -196,9 +196,9 @@ describe('ECPair', function () { })) it('loops until d is within interval [1, n) : n - 1', hoodwink(function () { - const rng = this.stub(function f () { - if (f.calls === 0) return ZERO // <1 - if (f.calls === 1) return GROUP_ORDER // >n-1 + const rng = this.stub(function () { + if (rng.calls === 0) return ZERO // <1 + if (rng.calls === 1) return GROUP_ORDER // >n-1 return GROUP_ORDER_LESS_1 // n-1 }, 3)