To help others who come here with the same question as me, ...
You probably don't need to boot from Cordova. Use mocks as stand-ins.
Since Cordova joins window, you can write your application code to enter $windowand mock the corridor with a standard mockery.
Example with mocha/ chai:
describe('platform = "ios"', function() {
var $window;
beforeEach('inject', inject(function(_$window_) {
$window = _$window_;
$window.cordova = {
platformId: 'ios',
}
}));
it('verifies cordova mock platform = "ios"', function() {
expect($window.cordova.platformId).to.equal('ios');
});
it('does something', function() {
});
});
kentr source
share