From 8926483c06df66109091242160838ae624f11539 Mon Sep 17 00:00:00 2001 From: lancegin Date: Thu, 29 Jun 2017 14:52:22 +0800 Subject: [PATCH] add: otp class test --- test/otp_test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/otp_test.js b/test/otp_test.js index e69de29..6100e67 100644 --- a/test/otp_test.js +++ b/test/otp_test.js @@ -0,0 +1,14 @@ +var otp = require('../lib/otp'); +var assert = require('assert'); + +describe('OTP module test', function() { + + var OTP = otp.OTP; + var a = new OTP("BASE32_ENCODED_SECRET"); + + describe('generate_otp() function', function() { + it("should print 'OTP.generate_otp'", function() { + assert.equal("OTP.generate_otp", a.generate_otp()) + }); + }); +});