From aa8b84bb56f87d61b04c5e2871c4fac75f5a92b1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 13 Jan 2021 10:18:38 -0500 Subject: [PATCH] fix(topic-events): topicEvents.init() test --- test/topicEvents.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/topicEvents.js b/test/topicEvents.js index 9330d31ba7..d3ec62c730 100644 --- a/test/topicEvents.js +++ b/test/topicEvents.js @@ -28,6 +28,10 @@ describe('Topic Events', () => { }); describe('.init()', () => { + before(() => { + topics.events._ready = false; + }); + it('should allow a plugin to expose new event types', async () => { await plugins.hooks.register('core', { hook: 'filter:topicEvents.init', @@ -45,6 +49,11 @@ describe('Topic Events', () => { await topics.events.init(); assert(topics.events._types.foo); + assert.deepStrictEqual(topics.events._types.foo, { + icon: 'bar', + text: 'baz', + quux: 'quux', + }); }); it('should do nothing if called a second time', async () => {