Fix backend tests

This commit is contained in:
Thomas Nordquist
2019-04-26 14:57:12 +02:00
parent af2ff0149d
commit 0f21f10c0d

View File

@@ -1,11 +1,10 @@
import 'mocha'
import { EventDispatcher } from '../../../../events'
import { expect } from 'chai'
import 'mocha'
describe('EventDispatcher', async () => {
it('should dispatch', async function () {
const dispatcher = new EventDispatcher<string, string>('me')
it('should dispatch', async function() {
const dispatcher = new EventDispatcher<string, string>()
this.timeout(300)
setTimeout(() => dispatcher.dispatch('hello'), 5)
@@ -18,8 +17,8 @@ describe('EventDispatcher', async () => {
expect(response).to.eq('hello')
})
it('should unsubscribe', async function () {
const dispatcher = new EventDispatcher<string, string>('me')
it('should unsubscribe', async function() {
const dispatcher = new EventDispatcher<string, string>()
this.timeout(300)
let incrementee = 0
const callback = (msg: any) => {