Skip to content

Commit 6ca3482

Browse files
author
Said Shah
committed
Updated naming inside tests for toast manager
1 parent 13a9412 commit 6ca3482

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/utilities/toast-manager.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,36 +57,36 @@ describe("ToastManager", () => {
5757
test("when toast dismissed, calls dismiss method", () => {
5858
// Arrange
5959
const testId = faker.random.number(99);
60-
const dismissSpy = jest.spyOn(ToastManager, "dismiss");
60+
const dismissMethodSpy = jest.spyOn(ToastManager, "dismiss");
6161

6262
// Act
6363
ToastManager.dismiss(testId);
6464

6565
// Assert
66-
expect(dismissSpy).toHaveBeenCalled();
66+
expect(dismissMethodSpy).toHaveBeenCalled();
6767
});
6868

6969
test("when dismiss All toasts, calls dismissAll method", () => {
7070
// Arrange
71-
const dismissSpy = jest.spyOn(ToastManager, "dismissAll");
71+
const dismissAllMethodSpy = jest.spyOn(ToastManager, "dismissAll");
7272

7373
// Act
7474
ToastManager.dismissAll();
7575

7676
// Assert
77-
expect(dismissSpy).toHaveBeenCalled();
77+
expect(dismissAllMethodSpy).toHaveBeenCalled();
7878
});
7979

8080
test("when update toast, calls update method", () => {
8181
// Arrange
82-
const dismissSpy = jest.spyOn(ToastManager, "update");
82+
const updateMethodSpy = jest.spyOn(ToastManager, "update");
8383
const newContent = faker.random.words();
8484
const testId = faker.random.number(99);
8585

8686
// Act
8787
ToastManager.update(testId, newContent);
8888

8989
// Assert
90-
expect(dismissSpy).toHaveBeenCalled();
90+
expect(updateMethodSpy).toHaveBeenCalled();
9191
});
9292
});

0 commit comments

Comments
 (0)