/jasmine-leak-test

Repro a jasmine memory leak

Primary LanguageJavaScript

jasmine leak test

Running the tests

npm install
npm test
npm run test-mocha

Or, open specRunner.html to run the tests in your browser.

Observing the leak

top -O mem # OSX
top -o %MEM # linux

On my machine (OSX 10.10.5, 16GB RAM) running Chrome 50.0.2661.94, memory usage for the Google Chrome process starts at around 240MB of memory, and climbs linearly to ~450MB until the suite is completed.

What this looks like in a real test suite

I first noticed this issue in my Angular test suite (~1500 tests). Memory timeline is below: