};
options = {
authenticator: {
- authnEnabled: ['indieAuth', 'DEBUG_ANY'],
+ authnEnabled: ['indieAuth'],
secureAuthOnly: true,
},
manager: {
};
});
- 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 = ['<p>This is a login page.</p>'];
options.authenticator.indieAuthBlurb = ['<p>Describe what IndieAuth allows one to do.</p>'];
options.authenticator.userBlurb = ['<p>Describe user login.</p>'];
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);
});