@@ -81,6 +81,15 @@ describe('hook', () => {
8181 const afterFindHookStub = sinon . stub ( Hook , 'afterFindHook' ) ;
8282 const beforeCountHookStub = sinon . stub ( Hook , 'beforeCountHook' ) ;
8383
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+
8493 // these hooks are aliases for the equivalent “destroy” hooks
8594 const beforeDeleteHookStub = sinon . stub ( Hook , 'beforeDeleteHook' ) ;
8695 const afterDeleteHookStub = sinon . stub ( Hook , 'afterDeleteHook' ) ;
@@ -176,6 +185,15 @@ describe('hook', () => {
176185 expect ( Hook [ 'options' ] . hooks [ 'afterFind' ] ) . to . include ( afterFindHookStub ) ;
177186 expect ( Hook [ 'options' ] . hooks [ 'beforeCount' ] ) . to . include ( beforeCountHookStub ) ;
178187
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+
179197 expect ( Hook [ 'options' ] . hooks [ 'beforeDestroy' ] ) . to . include ( beforeDeleteHookStub ) ;
180198 expect ( Hook [ 'options' ] . hooks [ 'afterDestroy' ] ) . to . include ( afterDeleteHookStub ) ;
181199 expect ( Hook [ 'options' ] . hooks [ 'beforeBulkDestroy' ] ) . to . include ( beforeBulkDeleteHookStub ) ;
0 commit comments