File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 "scripts" : {
2020 "changelog" : " github-changelog-generator --owner=uphold --repo=process-manager --future-release=v$npm_package_version > CHANGELOG.md" ,
2121 "lint" : " eslint src test" ,
22- "test" : " jest --coverage --runInBand -- verbose" ,
22+ "test" : " jest --coverage --verbose" ,
2323 "version" : " npm run changelog && git add -A CHANGELOG.md"
2424 },
2525 "dependencies" : {
2929 "@uphold/github-changelog-generator" : " ^0.4.1" ,
3030 "eslint" : " ^3.12.2" ,
3131 "eslint-config-seegno" : " ^8.0.1" ,
32- "jest" : " ^19.0 .1" ,
32+ "jest" : " ^27.5 .1" ,
3333 "pre-commit" : " ^1.2.2"
3434 },
35+ "jest" : {
36+ "restoreMocks" : true ,
37+ "testEnvironment" : " node"
38+ },
3539 "engines" : {
3640 "node" : " >=7.6"
3741 },
Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ class ProcessManager {
7777
7878 hook ( type , ...args ) {
7979 const hooks = this . hooks . filter ( hook => hook . type === type ) ;
80+
81+ if ( hooks . length === 0 ) {
82+ return ;
83+ }
84+
8085 const promises = hooks . map ( ( { handler, timeoutError } ) => {
8186 return Promise . race ( [
8287 utils . reflect ( handler , args ) ,
You can’t perform that action at this time.
0 commit comments