From 1556427b3922b01b369fd0e6c4a8c26516157673 Mon Sep 17 00:00:00 2001 From: Aaron Dufour Date: Fri, 12 Sep 2014 16:11:30 -0400 Subject: [PATCH] tests for not passing opt we just want those to not throw an error, which is why there's no assertions --- test/notp.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/notp.js b/test/notp.js index ef04f61..cfef9dd 100644 --- a/test/notp.js +++ b/test/notp.js @@ -50,6 +50,9 @@ exports.testHOTP = function() { }; var HOTP = ['755224', '287082','359152', '969429', '338314', '254676', '287922', '162583', '399871', '520489']; + // make sure we can not pass in opt + notp.hotp.verify('WILL NOT PASS', key); + // counterheck for failure opt.counter = 0; assert.ok(!notp.hotp.verify('WILL NOT PASS', key, opt), 'Should not pass'); @@ -76,6 +79,9 @@ exports.testTOTtoken = function() { window : 0, }; + // make sure we can not pass in opt + notp.totp.verify(token, key); + // counterheck for failure opt.time = 0; var token = 'windowILLNOTtokenASS'; @@ -172,6 +178,9 @@ exports.hotp_gen = function() { var HOTP = ['755224', '287082','359152', '969429', '338314', '254676', '287922', '162583', '399871', '520489']; + // make sure we can not pass in opt + notp.hotp.gen(key); + // counterheck for passes for(i=0;i