A couple of minor changes were required for test-ability:
Calls to global browser objects document and window should be via utility functions that can be stubbed.
Imports have to be via objects and not direct export. This is because ES6 protects exports which prevents them being spied on by Jasmine. It is a problem for all javascript test frameworks.
ActivityManager constructor made costly http requests so these were separated out into initializeActivities() method that's called after it's created.
Some unit tests for ActivityManager.
A couple of minor changes were required for test-ability:
document
andwindow
should be via utility functions that can be stubbed.Code coverage for the module at approx 52%