问题描述:

I want to test my JS application with Jasmine both with JSDom from the command line, and in browsers. What's the best practice to have a number of specs, but when they are run in browser, don't use JSDom? At the moment I have

beforeEach(() => {

const doc = jsdom.jsdom();

global['window'] = doc.defaultView;

global['document'] = doc;

});

I could create two separate test files for these scenarios but I would like to keep things organised.

相关阅读:
Top