Skip to content

Commit

Permalink
import Andrew's setup and teardown scripts
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
zFernand0 committed Oct 18, 2023
1 parent ca4cabf commit 6d1e840
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
14 changes: 14 additions & 0 deletions __tests__/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

module.exports = async function (globalConfig, projectConfig) {
require('events').EventEmitter.defaultMaxListeners = Infinity;
}
14 changes: 14 additions & 0 deletions __tests__/teardown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/

module.exports = async function (globalConfig, projectConfig) {
process.exitCode = 0; // Thanks Node 20
}
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
"\\.ts$": "ts-jest"
},
"testRegex": "__tests__.*\\.(spec|test)\\.ts$",
"transformIgnorePatterns": ["^.+\\.js$", "^.+\\.json$"],
"reporters": [
["github-actions", {"silent": false}],
"default",
"jest-junit"
],
"globalSetup": "./__tests__/setup.js",
"globalTeardown": "./__tests__/teardown.js",
"moduleFileExtensions": [
"ts",
"js"
Expand Down
3 changes: 2 additions & 1 deletion packages/imperative/tsconfig-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
],
"files": [
"../../__types__/wontache.d.ts"
]
],
"allowJs": true
}

0 comments on commit 6d1e840

Please sign in to comment.