mirror of
https://github.com/LanceGin/jsotp.git
synced 2024-10-06 06:22:08 +08:00
add: TOTP module test
This commit is contained in:
parent
0278f4e041
commit
472c4b180e
@ -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());
|
||||
})
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue
Block a user