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:
1 parent
1fbd106412
commit
61d97197ec
1 file changed
+14
@@ -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")
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user