-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update naming from notification to notifier
- Loading branch information
Showing
12 changed files
with
57 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
packages/bonito-core/src/notification/__tests__/fake-notification.spec.ts
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
packages/bonito-core/src/notification/__tests__/fake-notifier.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { initMockEnvironment } from "../../environment"; | ||
import { FakeNotifier } from "../fake-notifier"; | ||
|
||
describe("Fake notification tests", () => { | ||
let notifier: FakeNotifier; | ||
|
||
beforeEach(() => { | ||
initMockEnvironment(); | ||
notifier = new FakeNotifier(); | ||
}); | ||
|
||
afterEach(() => { | ||
jest.restoreAllMocks(); | ||
}); | ||
|
||
test("Each notifier function works as expected", () => { | ||
notifier.expectInfo("Info Notification : This is an info", {}); | ||
notifier.info("Info Notification", "This is an info"); | ||
|
||
notifier.expectWarn("Warn Notification : This is a warning", {}); | ||
notifier.warn("Warn Notification", "This is a warning"); | ||
|
||
notifier.expectInProgress( | ||
"In Progress Notification : Action in progress", | ||
{} | ||
); | ||
notifier.inProgress("In Progress Notification", "Action in progress"); | ||
|
||
notifier.expectSuccess("Success Notification : This is a success", {}); | ||
notifier.success("Success Notification", "This is a success"); | ||
|
||
notifier.expectError("Error Notification : This is an error", {}); | ||
notifier.error("Error Notification", "This is an error"); | ||
}); | ||
}); |
6 changes: 3 additions & 3 deletions
6
...ore/src/notification/mock-notification.ts → ...o-core/src/notification/alert-notifier.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./notification"; | ||
export * from "./notifier"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters