4 const assert
= require('assert');
5 const template
= require('../../../src/template/admin-topic-details-html');
6 const Config
= require('../../../config');
7 const lintHtml
= require('../../lint-html');
9 describe('Admin Topic Details HTML Template', function () {
12 beforeEach(function () {
15 topicId: '97dd5488-a303-11ec-97ab-0025905f714a',
22 config
= new Config('test');
25 it('renders', function () {
26 const result
= template(ctx
, config
);
30 it('covers null topic', function () {
32 ctx
.subscriptions
= null;
33 const result
= template(ctx
, config
);
37 it('covers missing subscriptions', function () {
38 delete ctx
.subscriptions
;
39 const result
= template(ctx
, config
);
43 it('covers plural subscriptions', function () {
44 ctx
.subscriptions
= [{}, {}, {}];
45 const result
= template(ctx
, config
);