The global window variable doesn't necessarily exist in all environments, for example Nativescript where Karma runs tests in a non-browser environment.
Offending code:
if (typeof module !== 'undefined' && module.exports) {
module.exports = setup;
} else if (window.sinon) {
setup(window.sinon);
}
The global window variable doesn't necessarily exist in all environments, for example Nativescript where Karma runs tests in a non-browser environment.
Offending code:
Proposed change
I have implemented a code fix that I will submit as a pull request soon.