Skip to content

Demonstrates the slowdown when using honeybadger with jsdom

Notifications You must be signed in to change notification settings

aub/honeybadger-jsdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To see the problem, you should just need to do npm install and then npm run test. What will happen is that the tests will gradually slow to a crawl and then fail to complete. If you really want to make it happen fast, you can add --maxWorkers=1 to the command for running the tests in the scripts section of package.json.

Things I've learned:

  • Honeybadger's singleton is getting initialized once per test file, setting up its instrumentation each time.
  • Commenting out the contents of Honeybadger's instrument function does fix the problem.
  • Putting console statements into the callbacks from instrument shows them being called many times per test execution
  • In jest-environment-jsdom-fourteen, the environment is also initialized once per test file. The environment appears to be creating a new jsdom_1.JSDOM instance, so I'm not sure how the event handlers are remaining each time.

About

Demonstrates the slowdown when using honeybadger with jsdom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors