1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

add tests for EventBus

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-10-16 13:26:59 +03:00
parent 1fbd106412
commit 61d97197ec

View File

@ -0,0 +1,14 @@
import { appEventBus, AppEvent } from "../event-bus"
describe("event bus tests", () => {
describe("emit", () => {
it("emits an event", () => {
let event: AppEvent = null
appEventBus.on((ev: AppEvent) => {
event = ev
})
appEventBus.emit({name: "foo", action: "bar"})
expect(event.name).toBe("foo")
})
})
})