X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Ftemplate%2Fadmin-overview-html.js;h=1e715d28dd686630bfdcd7de2797661dd91adacc;hb=HEAD;hp=5fa0a0e1bb903d303052e2de4ceecf846b32b9bf;hpb=9696c012e6b9a6c58904baa397ca0ebf78112316;p=websub-hub diff --git a/test/src/template/admin-overview-html.js b/test/src/template/admin-overview-html.js index 5fa0a0e..1f99782 100644 --- a/test/src/template/admin-overview-html.js +++ b/test/src/template/admin-overview-html.js @@ -1,30 +1,34 @@ /* eslint-env mocha */ 'use strict'; -const assert = require('assert'); +const assert = require('node:assert'); const template = require('../../../src/template/admin-overview-html'); const Config = require('../../../config'); -const config = new Config('test'); +const lintHtml = require('../../lint-html'); describe('Admin Overview HTML Template', function () { - let ctx; + let ctx, config; beforeEach(function () { ctx = {}; + config = new Config('test'); }); - it('covers missing topics', function () { + it('covers missing topics', async function () { const result = template(ctx, config); + await lintHtml(result); assert(result); }); - it('covers single topic', function () { + it('covers single topic', async function () { ctx.topics = [{}]; const result = template(ctx, config); + await lintHtml(result); assert(result); }); - it('covers plural topics', function () { + it('covers plural topics', async function () { ctx.topics = [{}, {}, {}]; const result = template(ctx, config); + await lintHtml(result); assert(result); }); });