3 const assert
= require('node:assert');
4 const { OTPHTML
} = require('../../../lib/template');
5 const lintHtml
= require('../../lint-html');
7 describe('Template OTPHTML', function () {
9 beforeEach(function () {
13 otpBlurb: ['otp info'],
19 selfBaseUrl: 'https://example.com/',
24 it('renders', async
function () {
25 ctx
.errors
= ['an error', 'another error'];
26 const result
= OTPHTML(ctx
, options
);
27 await
lintHtml(result
);
31 it('covers empty error', async
function () {
32 delete options
.authenticator
.otpBlurb
;
33 const result
= OTPHTML(ctx
, options
);
34 await
lintHtml(result
);