@@ -13,28 +13,28 @@ describe("HookManager", () => {
1313
1414 it ( "should add and trigger check-is-enabled hooks" , ( ) => {
1515 const callback = vi . fn ( ) ;
16- hookManager . addHook ( "checkIsEnabled " , callback ) ;
16+ hookManager . addHook ( "isEnabledCheck " , callback ) ;
1717
1818 const checkEvent : CheckEvent = {
1919 action : "check-is-enabled" ,
2020 key : "test-key" ,
2121 value : true ,
2222 } ;
23- hookManager . trigger ( "checkIsEnabled " , checkEvent ) ;
23+ hookManager . trigger ( "isEnabledCheck " , checkEvent ) ;
2424
2525 expect ( callback ) . toHaveBeenCalledWith ( checkEvent ) ;
2626 } ) ;
2727
28- it ( "should add and trigger checkConfig hooks" , ( ) => {
28+ it ( "should add and trigger configCheck hooks" , ( ) => {
2929 const callback = vi . fn ( ) ;
30- hookManager . addHook ( "checkConfig " , callback ) ;
30+ hookManager . addHook ( "configCheck " , callback ) ;
3131
3232 const checkEvent : CheckEvent = {
3333 action : "check-config" ,
3434 key : "test-key" ,
3535 value : { key : "key" , payload : "payload" } ,
3636 } ;
37- hookManager . trigger ( "checkConfig " , checkEvent ) ;
37+ hookManager . trigger ( "configCheck " , checkEvent ) ;
3838
3939 expect ( callback ) . toHaveBeenCalledWith ( checkEvent ) ;
4040 } ) ;
@@ -94,15 +94,15 @@ describe("HookManager", () => {
9494 const callback1 = vi . fn ( ) ;
9595 const callback2 = vi . fn ( ) ;
9696
97- hookManager . addHook ( "checkIsEnabled " , callback1 ) ;
98- hookManager . addHook ( "checkIsEnabled " , callback2 ) ;
97+ hookManager . addHook ( "isEnabledCheck " , callback1 ) ;
98+ hookManager . addHook ( "isEnabledCheck " , callback2 ) ;
9999
100100 const checkEvent : CheckEvent = {
101101 action : "check-is-enabled" ,
102102 key : "test-key" ,
103103 value : true ,
104104 } ;
105- hookManager . trigger ( "checkIsEnabled " , checkEvent ) ;
105+ hookManager . trigger ( "isEnabledCheck " , checkEvent ) ;
106106
107107 expect ( callback1 ) . toHaveBeenCalledWith ( checkEvent ) ;
108108 expect ( callback2 ) . toHaveBeenCalledWith ( checkEvent ) ;
@@ -112,16 +112,16 @@ describe("HookManager", () => {
112112 const callback1 = vi . fn ( ) ;
113113 const callback2 = vi . fn ( ) ;
114114
115- hookManager . addHook ( "checkIsEnabled " , callback1 ) ;
116- hookManager . addHook ( "checkIsEnabled " , callback2 ) ;
117- hookManager . removeHook ( "checkIsEnabled " , callback1 ) ;
115+ hookManager . addHook ( "isEnabledCheck " , callback1 ) ;
116+ hookManager . addHook ( "isEnabledCheck " , callback2 ) ;
117+ hookManager . removeHook ( "isEnabledCheck " , callback1 ) ;
118118
119119 const checkEvent : CheckEvent = {
120120 action : "check-is-enabled" ,
121121 key : "test-key" ,
122122 value : true ,
123123 } ;
124- hookManager . trigger ( "checkIsEnabled " , checkEvent ) ;
124+ hookManager . trigger ( "isEnabledCheck " , checkEvent ) ;
125125
126126 expect ( callback1 ) . not . toHaveBeenCalled ( ) ;
127127 expect ( callback2 ) . toHaveBeenCalledWith ( checkEvent ) ;
@@ -131,16 +131,16 @@ describe("HookManager", () => {
131131 const callback1 = vi . fn ( ) ;
132132 const callback2 = vi . fn ( ) ;
133133
134- const removeHook1 = hookManager . addHook ( "checkIsEnabled " , callback1 ) ;
135- hookManager . addHook ( "checkIsEnabled " , callback2 ) ;
134+ const removeHook1 = hookManager . addHook ( "isEnabledCheck " , callback1 ) ;
135+ hookManager . addHook ( "isEnabledCheck " , callback2 ) ;
136136 removeHook1 ( ) ;
137137
138138 const checkEvent : CheckEvent = {
139139 action : "check-is-enabled" ,
140140 key : "test-key" ,
141141 value : true ,
142142 } ;
143- hookManager . trigger ( "checkIsEnabled " , checkEvent ) ;
143+ hookManager . trigger ( "isEnabledCheck " , checkEvent ) ;
144144
145145 expect ( callback1 ) . not . toHaveBeenCalled ( ) ;
146146 expect ( callback2 ) . toHaveBeenCalledWith ( checkEvent ) ;
0 commit comments