mirror of
https://github.com/LanceGin/jsotp.git
synced 2024-10-06 06:22:08 +08:00
add: HOTP module test
This commit is contained in:
parent
8926483c06
commit
0278f4e041
@ -0,0 +1,20 @@
|
||||
var hotp = require('../lib/hotp');
|
||||
var assert = require('assert');
|
||||
|
||||
describe('HOTP module test', function() {
|
||||
|
||||
var HOTP = hotp.HOTP;
|
||||
var a = new HOTP("BASE32_ENCODED_SECRET");
|
||||
|
||||
describe('at() function', function() {
|
||||
it("should print 'HOTP.at'", function() {
|
||||
assert.equal("HOTP.at", a.at());
|
||||
});
|
||||
});
|
||||
|
||||
describe('verify() function', function() {
|
||||
it("should print 'HOTP.verify'", function() {
|
||||
assert.equal("HOTP.verify", a.verify());
|
||||
})
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue
Block a user