mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-05-05 00:00:03 +08:00
21 lines
528 B
JavaScript
21 lines
528 B
JavaScript
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());
|
|
})
|
|
})
|
|
});
|