Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ref(tests): Suppress unconstructive listener and open handle warnings.
  • Loading branch information
onurtemizkan committed Apr 19, 2022
commit ed47451556d5e611487e1c1c566166f0f963de57
1 change: 1 addition & 0 deletions packages/node-integration-tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const baseConfig = require('../../jest.config.js');

module.exports = {
globalSetup: '<rootDir>/setup-tests.ts',
...baseConfig,
testMatch: ['**/test.ts'],
};
2 changes: 1 addition & 1 deletion packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
"lint:prettier": "prettier --check \"{suites,utils}/**/*.ts\"",
"type-check": "tsc",
"test": "jest --detectOpenHandles --runInBand --forceExit",
"test": "jest --runInBand --forceExit",
"test:watch": "yarn test --watch"
},
"dependencies": {
Expand Down
8 changes: 8 additions & 0 deletions packages/node-integration-tests/setup-tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventEmitter from 'events';

const setup = async (): Promise<void> => {
// Remove MaxEventListeners warning.
EventEmitter.defaultMaxListeners = 0;
};

export default setup;