2a49a71959245af873001d058b1dcae5c5f657c2
4 const assert
= require('node:assert');
5 const { OTPHTML
} = require('../../../lib/template');
6 const lintHtml
= require('../../lint-html');
8 describe('Template OTPHTML', function () {
10 beforeEach(function () {
14 otpBlurb: ['otp info'],
20 selfBaseUrl: 'https://example.com/',
25 it('renders', async
function () {
26 ctx
.errors
= ['an error', 'another error'];
27 const result
= OTPHTML(ctx
, options
);
28 await
lintHtml(result
);
32 it('covers empty error', async
function () {
33 delete options
.authenticator
.otpBlurb
;
34 const result
= OTPHTML(ctx
, options
);
35 await
lintHtml(result
);