X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Ftemplate%2Fadmin-topic-details-html.js;h=ce19af7d1b2b064997052c4c375d393fc965ed84;hb=HEAD;hp=823b439d695ecbe41566b40d91a38382fae433b4;hpb=3bc885c4b6ef8e5ced2ee9708194523a41ebfe7a;p=websub-hub diff --git a/test/src/template/admin-topic-details-html.js b/test/src/template/admin-topic-details-html.js index 823b439..ce19af7 100644 --- a/test/src/template/admin-topic-details-html.js +++ b/test/src/template/admin-topic-details-html.js @@ -1,7 +1,7 @@ /* eslint-env mocha */ 'use strict'; -const assert = require('assert'); +const assert = require('node:assert'); const template = require('../../../src/template/admin-topic-details-html'); const Config = require('../../../config'); const lintHtml = require('../../lint-html'); @@ -11,6 +11,9 @@ describe('Admin Topic Details HTML Template', function () { beforeEach(function () { ctx = { + params: { + topicId: '97dd5488-a303-11ec-97ab-0025905f714a', + }, topic: {}, subscriptions: [ {}, @@ -19,28 +22,28 @@ describe('Admin Topic Details HTML Template', function () { config = new Config('test'); }); - it('renders', function () { + it('renders', async function () { const result = template(ctx, config); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers null topic', function () { + it('covers null topic', async function () { ctx.topic = null; ctx.subscriptions = null; const result = template(ctx, config); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers missing subscriptions', function () { + it('covers missing subscriptions', async function () { delete ctx.subscriptions; const result = template(ctx, config); - lintHtml(result); + await lintHtml(result); assert(result); }); - it('covers plural subscriptions', function () { + it('covers plural subscriptions', async function () { ctx.subscriptions = [{}, {}, {}]; const result = template(ctx, config); - lintHtml(result); + await lintHtml(result); assert(result); }); });