From 0278f4e041a9f3b95582d2dc77014a2773cd2b0f Mon Sep 17 00:00:00 2001 From: lancegin Date: Thu, 29 Jun 2017 15:03:11 +0800 Subject: [PATCH] add: HOTP module test --- test/hotp_test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/hotp_test.js b/test/hotp_test.js index e69de29..2965ff8 100644 --- a/test/hotp_test.js +++ b/test/hotp_test.js @@ -0,0 +1,20 @@ +var hotp = require('../lib/hotp'); +var assert = require('assert'); + +describe('HOTP module test', function() { + + var HOTP = hotp.HOTP; + var a = new HOTP("BASE32_ENCODED_SECRET"); + + describe('at() function', function() { + it("should print 'HOTP.at'", function() { + assert.equal("HOTP.at", a.at()); + }); + }); + + describe('verify() function', function() { + it("should print 'HOTP.verify'", function() { + assert.equal("HOTP.verify", a.verify()); + }) + }) +});