mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-05-05 00:00:03 +08:00
add: TOTP module test
This commit is contained in:
@@ -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());
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user