Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
unit(consultation): clear listeners
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Trecy Tobias <19201.tobias.kennethtrecy.c@gmail.com>
  • Loading branch information
lemredd and KennethTrecy committed Oct 11, 2022
1 parent 6b6da87 commit 37ef5b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/consultation/chat_window.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ describe("Component: consultation/chat_window", () => {
const consultationHeader = wrapper.find(".selected-consultation-header")
expect(consultationHeader.exists()).toBeTruthy()
expect(consultationHeader.html()).toContain("5m")
ConsultationTimerManager.clearAllListeners()
})

it("should start consultation on other source's update", async() => {
Expand Down Expand Up @@ -260,6 +261,7 @@ describe("Component: consultation/chat_window", () => {
expect(consultationHeader.exists()).toBeTruthy()
expect(consultationHeader.html()).toContain("4m")
expect(consultationHeader.html()).toContain("59s")
ConsultationTimerManager.clearAllListeners()
})

it("should restart the timer", async() => {
Expand Down Expand Up @@ -333,7 +335,9 @@ describe("Component: consultation/chat_window", () => {
expect(firstRequestBody).not.toHaveProperty("data.attributes.startedAt", null)
expect(firstRequestBody).toHaveProperty("data.id", "1")
expect(firstRequestBody).toHaveProperty("data.type", "consultation")
ConsultationTimerManager.clearAllListeners()
})
})

describe("after", () => {
it("should automatically terminate the consultation", async() => {
Expand Down

0 comments on commit 37ef5b3

Please sign in to comment.