jest: Bug: MacOS "usernoted" process eats all RAM
Do you want to request a feature or report a bug? Bug
What is the current behavior?
When Jest is ran on watch mode and notify
option is turned on and there are failing tests, MacOS’ usernoted
process consumes too much RAM.
What is the expected behavior? There should not be any memory leaks.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
"jest": {
"coveragePathIgnorePatterns": [
"<rootDir>/node_modules",
"<rootDir>/release"
],
"modulePathIgnorePatterns": [
"<rootDir>/node_modules",
"<rootDir>/release"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test))\\.(tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"mapCoverage": true,
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"notify": true
}
- Jest 22.3.0
- NPM 5.6.0
- MacOS 10.13.3
I saw that there has been the memory issue on terminal-notifier
but since this is a different process I am posting it as a separate issue.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 15 (4 by maintainers)
Still an issue in 2020…
I’m getting this on Mojave 10.14
usernotesd
is casually using 58GB (!!!) of RAM on my 16GB MacBook Pro. Pore over this screenshot! Aren’t the numbers beautiful?Also seeing this with
jest@24.8.0
on macOS Mojave 10.14.5. Unlike OP, I’m running--watch
but not--notify
. Specifically, I’m running:jest some/path --silent --watch
killall usernoted
does the trick, but stopping the Jest watch process does not.Jest team: any idea which dep you’re using might hook into
usernoted
? Makes sense to think it could be whatever system notifications dep is used by--notify
, but like I said I’m not even passing that flag. This could be a Jest issue if multiple instances of the system notifications dep are being created, or it could be downstream in that dep.Experiencing this on a brand new
macOS High Sierra 10.13.6
. It ate up to 30 GB of RAM (so almost all the RAM?). I had to force quitusernoted
.Jest 23.6.0
,react-scripts@2.1.1