From 472c4b180e8ac623652c4073cb97c96bfe13bbdb Mon Sep 17 00:00:00 2001 From: lancegin Date: Thu, 29 Jun 2017 15:06:25 +0800 Subject: [PATCH] add: TOTP module test --- test/totp_test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/totp_test.js b/test/totp_test.js index e69de29..573f44a 100644 --- a/test/totp_test.js +++ b/test/totp_test.js @@ -0,0 +1,20 @@ +var totp = require('../lib/totp'); +var assert = require('assert'); + +describe('TOTP module test', function() { + + var TOTP = totp.TOTP; + var a = new TOTP("BASE32_ENCODED_SECRET"); + + describe('now() function', function() { + it("should print 'TOTP.now'", function() { + assert.equal("TOTP.now", a.now()); + }); + }); + + describe('verify() function', function() { + it("should print 'TOTP.verify'", function() { + assert.equal("TOTP.verify", a.verify()); + }) + }) +});