X-Git-Url: https://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=test%2Flib%2Ftemplate%2Flogin-html.js;fp=test%2Flib%2Ftemplate%2Flogin-html.js;h=d9ed065d86a451feee8f3f6cd8b86d203653066b;hp=6bf0b8fa5c47fd420269d6274d1d280d8a9f2c9a;hb=53ef948ea83106e82d55e60d6695a15e94bf725e;hpb=842a3da269de1ab82e9a2a12aae8ed5677f064d8 diff --git a/test/lib/template/login-html.js b/test/lib/template/login-html.js index 6bf0b8f..d9ed065 100644 --- a/test/lib/template/login-html.js +++ b/test/lib/template/login-html.js @@ -13,7 +13,7 @@ describe('Template LoginHTML', function () { }; options = { authenticator: { - authnEnabled: ['indieAuth', 'DEBUG_ANY'], + authnEnabled: ['indieAuth'], secureAuthOnly: true, }, manager: { @@ -25,42 +25,42 @@ describe('Template LoginHTML', function () { }; }); - it('covers', function () { + it('covers', async function () { const result = LoginHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('renders errors and additional content', function () { + it('renders errors and additional content', async function () { ctx.errors = ['an error', 'another error']; options.manager.logoUrl = 'https://example.com/logo.png'; options.authenticator.loginBlurb = ['

This is a login page.

']; options.authenticator.indieAuthBlurb = ['

Describe what IndieAuth allows one to do.

']; options.authenticator.userBlurb = ['

Describe user login.

']; const result = LoginHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers no indieAuth', function () { + it('covers no indieAuth', async function () { options.authenticator.authnEnabled = []; const result = LoginHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers insecure not allowed', function () { + it('covers insecure not allowed', async function () { ctx.clientProtocol = undefined; const result = LoginHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers insecure allowed', function () { + it('covers insecure allowed', async function () { ctx.clientProtocol = 'http'; options.authenticator.secureAuthOnly = false; const result = LoginHTML(ctx, options); - lintHtml(result); + await lintHtml(result); assert(result); });