X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Flib%2Ftemplate%2Fotp-html.js;h=2a49a71959245af873001d058b1dcae5c5f657c2;hb=HEAD;hp=5aa3d8bc6a812b04214f8139090e4ece5a882f3d;hpb=2ca511865b0caf3108819cfd6ee775124ea70dff;p=squeep-authentication-module diff --git a/test/lib/template/otp-html.js b/test/lib/template/otp-html.js index 5aa3d8b..cdfcc0d 100644 --- a/test/lib/template/otp-html.js +++ b/test/lib/template/otp-html.js @@ -1,7 +1,6 @@ -/* eslint-env mocha */ 'use strict'; -const assert = require('assert'); +const assert = require('node:assert'); const { OTPHTML } = require('../../../lib/template'); const lintHtml = require('../../lint-html'); @@ -22,16 +21,17 @@ describe('Template OTPHTML', function () { }; }); - it('renders', function () { + it('renders', async function () { ctx.errors = ['an error', 'another error']; const result = OTPHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers empty error', function () { + it('covers empty error', async function () { + delete options.authenticator.otpBlurb; const result = OTPHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); });