add: TOTP module test

This commit is contained in:
lancegin 2017-06-29 15:06:25 +08:00
parent 0278f4e041
commit 472c4b180e

View File

@ -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());
})
})
});