@@ -81,6 +81,15 @@ describe('hook', () => {
81
81
const afterFindHookStub = sinon . stub ( Hook , 'afterFindHook' ) ;
82
82
const beforeCountHookStub = sinon . stub ( Hook , 'beforeCountHook' ) ;
83
83
84
+ const beforeBulkSyncHookStub = sinon . stub ( Hook , 'beforeBulkSyncHook' ) ;
85
+ const afterBulkSyncHookStub = sinon . stub ( Hook , 'afterBulkSyncHook' ) ;
86
+ const beforeConnectHookStub = sinon . stub ( Hook , 'beforeConnectHook' ) ;
87
+ const afterConnectHookStub = sinon . stub ( Hook , 'afterConnectHook' ) ;
88
+ const beforeDefineHookStub = sinon . stub ( Hook , 'beforeDefineHook' ) ;
89
+ const afterDefineHookStub = sinon . stub ( Hook , 'afterDefineHook' ) ;
90
+ const beforeInitHookStub = sinon . stub ( Hook , 'beforeInitHook' ) ;
91
+ const afterInitHookStub = sinon . stub ( Hook , 'afterInitHook' ) ;
92
+
84
93
// these hooks are aliases for the equivalent “destroy” hooks
85
94
const beforeDeleteHookStub = sinon . stub ( Hook , 'beforeDeleteHook' ) ;
86
95
const afterDeleteHookStub = sinon . stub ( Hook , 'afterDeleteHook' ) ;
@@ -176,6 +185,15 @@ describe('hook', () => {
176
185
expect ( Hook [ 'options' ] . hooks [ 'afterFind' ] ) . to . include ( afterFindHookStub ) ;
177
186
expect ( Hook [ 'options' ] . hooks [ 'beforeCount' ] ) . to . include ( beforeCountHookStub ) ;
178
187
188
+ expect ( Hook [ 'options' ] . hooks [ 'beforeBulkSync' ] ) . to . include ( beforeBulkSyncHookStub ) ;
189
+ expect ( Hook [ 'options' ] . hooks [ 'afterBulkSync' ] ) . to . include ( afterBulkSyncHookStub ) ;
190
+ expect ( Hook [ 'options' ] . hooks [ 'beforeConnect' ] ) . to . include ( beforeConnectHookStub ) ;
191
+ expect ( Hook [ 'options' ] . hooks [ 'afterConnect' ] ) . to . include ( afterConnectHookStub ) ;
192
+ expect ( Hook [ 'options' ] . hooks [ 'beforeDefine' ] ) . to . include ( beforeDefineHookStub ) ;
193
+ expect ( Hook [ 'options' ] . hooks [ 'afterDefine' ] ) . to . include ( afterDefineHookStub ) ;
194
+ expect ( Hook [ 'options' ] . hooks [ 'beforeInit' ] ) . to . include ( beforeInitHookStub ) ;
195
+ expect ( Hook [ 'options' ] . hooks [ 'afterInit' ] ) . to . include ( afterInitHookStub ) ;
196
+
179
197
expect ( Hook [ 'options' ] . hooks [ 'beforeDestroy' ] ) . to . include ( beforeDeleteHookStub ) ;
180
198
expect ( Hook [ 'options' ] . hooks [ 'afterDestroy' ] ) . to . include ( afterDeleteHookStub ) ;
181
199
expect ( Hook [ 'options' ] . hooks [ 'beforeBulkDestroy' ] ) . to . include ( beforeBulkDeleteHookStub ) ;
0 commit comments