mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
- General Code Refactor - Removed builder type argument from getBuilder API - Removed any reference of conditional statements around builder type - Remove plugin handler install and uninstall option flag android_studio - Remove --gradle flag references - Fixed plugin handler install and uninstall pathing issues - Added parseBuildOptions export so run can get build related options. - Use the nobuild flag option to control the run build. - Updated test spec to reflect the changes.
This commit is contained in:
@@ -31,24 +31,15 @@ describe('builders', () => {
|
||||
|
||||
describe('getBuilder', () => {
|
||||
it('should return an instance of ProjectBuilder when gradle is requested', () => {
|
||||
const newBuilder = builders.getBuilder('gradle');
|
||||
const newBuilder = builders.getBuilder();
|
||||
expect(newBuilder).toEqual(jasmine.any(ProjectBuilder));
|
||||
});
|
||||
|
||||
it('should return an instance of ProjectBuilder when studio is requested', () => {
|
||||
const newBuilder = builders.getBuilder('studio');
|
||||
expect(newBuilder).toEqual(jasmine.any(ProjectBuilder));
|
||||
});
|
||||
|
||||
it('should throw an error if the selected builder does not exist', () => {
|
||||
expect(() => builders.getBuilder('NonExistentBuilder')).toThrow(jasmine.any(CordovaError));
|
||||
});
|
||||
|
||||
it('should throw an error if a builder cannot be instantiated', () => {
|
||||
const requireSpy = jasmine.createSpy('require').and.throwError();
|
||||
builders.__set__('require', requireSpy);
|
||||
|
||||
expect(() => builders.getBuilder('gradle')).toThrow(jasmine.any(CordovaError));
|
||||
expect(() => builders.getBuilder()).toThrow(jasmine.any(CordovaError));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user