1
- import { displayError , isNotificationTextPrefixed , MsgType , NotificationMsg } from "./index"
1
+ import { displaySuccess , isNotificationTextPrefixed , MsgType , NotificationMsg } from "./index"
2
2
3
3
describe ( "Snackbar" , ( ) => {
4
4
describe ( "isNotificationTextPrefixed" , ( ) => {
@@ -15,7 +15,7 @@ describe("Snackbar", () => {
15
15
} )
16
16
} )
17
17
18
- describe ( "displayError " , ( ) => {
18
+ describe ( "displaySuccess " , ( ) => {
19
19
const originalWindowDispatchEvent = window . dispatchEvent
20
20
let dispatchEventMock : jest . Mock
21
21
@@ -47,13 +47,13 @@ describe("Snackbar", () => {
47
47
it ( "can be called with only a title" , ( ) => {
48
48
// Given
49
49
const expected : NotificationMsg = {
50
- msgType : MsgType . Error ,
50
+ msgType : MsgType . Success ,
51
51
msg : "Test" ,
52
52
additionalMsgs : undefined ,
53
53
}
54
54
55
55
// When
56
- displayError ( "Test" )
56
+ displaySuccess ( "Test" )
57
57
58
58
// Then
59
59
expect ( dispatchEventMock ) . toBeCalledTimes ( 1 )
@@ -63,13 +63,13 @@ describe("Snackbar", () => {
63
63
it ( "can be called with a title and additional message" , ( ) => {
64
64
// Given
65
65
const expected : NotificationMsg = {
66
- msgType : MsgType . Error ,
66
+ msgType : MsgType . Success ,
67
67
msg : "Test" ,
68
68
additionalMsgs : [ "additional message" ] ,
69
69
}
70
70
71
71
// When
72
- displayError ( "Test" , "additional message" )
72
+ displaySuccess ( "Test" , "additional message" )
73
73
74
74
// Then
75
75
expect ( dispatchEventMock ) . toBeCalledTimes ( 1 )
0 commit comments