breautek commented on a change in pull request #1211:
URL: https://github.com/apache/cordova-android/pull/1211#discussion_r615486204



##########
File path: spec/unit/check_reqs.spec.js
##########
@@ -294,62 +291,63 @@ describe('check_reqs', function () {
             }).toThrow();
         });
 
-        it('should override target from config.xml preference', () => {
-            var realExistsSync = fs.existsSync;
-            spyOn(fs, 'existsSync').and.callFake(function (path) {
-                if (path.indexOf('config.xml') > -1) {
-                    return true;
-                } else {
-                    return realExistsSync.call(fs, path);
-                }
-            });
-
-            getPreferenceSpy.and.returnValue(DEFAULT_TARGET_API + 1);
-
-            var target = check_reqs.get_target();
-
-            
expect(getPreferenceSpy).toHaveBeenCalledWith('android-targetSdkVersion', 
'android');
-            expect(target).toBe('android-' + (DEFAULT_TARGET_API + 1));
-        });
-
-        it('should fallback to default target if config.xml has invalid 
preference', () => {
-            var realExistsSync = fs.existsSync;
-            spyOn(fs, 'existsSync').and.callFake(function (path) {
-                if (path.indexOf('config.xml') > -1) {
-                    return true;
-                } else {
-                    return realExistsSync.call(fs, path);
-                }
-            });
-
-            getPreferenceSpy.and.returnValue(NaN);
-
-            var target = check_reqs.get_target();
-
-            
expect(getPreferenceSpy).toHaveBeenCalledWith('android-targetSdkVersion', 
'android');
-            expect(target).toBe('android-' + DEFAULT_TARGET_API);
-        });
-
-        it('should warn if target sdk preference is lower than the minimum 
required target SDK', () => {
-            var realExistsSync = fs.existsSync;
-            spyOn(fs, 'existsSync').and.callFake(function (path) {
-                if (path.indexOf('config.xml') > -1) {
-                    return true;
-                } else {
-                    return realExistsSync.call(fs, path);
-                }
-            });
-
-            spyOn(events, 'emit');
-
-            getPreferenceSpy.and.returnValue(DEFAULT_TARGET_API - 1);
-
-            var target = check_reqs.get_target();
-
-            
expect(getPreferenceSpy).toHaveBeenCalledWith('android-targetSdkVersion', 
'android');
-            expect(target).toBe('android-' + DEFAULT_TARGET_API);
-            expect(events.emit).toHaveBeenCalledWith('warn', 
'android-targetSdkVersion should be greater than or equal to ' + 
DEFAULT_TARGET_API + '.');
-        });
+        // TODO(Breautek) Delete these tests if they are not actually 
required...
+        // it('should override target from config.xml preference', () => {
+        //     var realExistsSync = fs.existsSync;
+        //     spyOn(fs, 'existsSync').and.callFake(function (path) {
+        //         if (path.indexOf('config.xml') > -1) {
+        //             return true;
+        //         } else {
+        //             return realExistsSync.call(fs, path);
+        //         }
+        //     });
+
+        //     getPreferenceSpy.and.returnValue(DEFAULT_TARGET_API + 1);
+
+        //     var target = check_reqs.get_target();
+
+        //     
expect(getPreferenceSpy).toHaveBeenCalledWith('android-targetSdkVersion', 
'android');
+        //     expect(target).toBe('android-' + (DEFAULT_TARGET_API + 1));
+        // });
+
+        // it('should fallback to default target if config.xml has invalid 
preference', () => {
+        //     var realExistsSync = fs.existsSync;
+        //     spyOn(fs, 'existsSync').and.callFake(function (path) {
+        //         if (path.indexOf('config.xml') > -1) {
+        //             return true;
+        //         } else {
+        //             return realExistsSync.call(fs, path);
+        //         }
+        //     });
+
+        //     getPreferenceSpy.and.returnValue(NaN);
+
+        //     var target = check_reqs.get_target();
+
+        //     
expect(getPreferenceSpy).toHaveBeenCalledWith('android-targetSdkVersion', 
'android');
+        //     expect(target).toBe('android-' + DEFAULT_TARGET_API);
+        // });
+
+        // it('should warn if target sdk preference is lower than the minimum 
required target SDK', () => {
+        //     var realExistsSync = fs.existsSync;
+        //     spyOn(fs, 'existsSync').and.callFake(function (path) {
+        //         if (path.indexOf('config.xml') > -1) {
+        //             return true;
+        //         } else {
+        //             return realExistsSync.call(fs, path);
+        //         }
+        //     });
+
+        //     spyOn(events, 'emit');
+
+        //     getPreferenceSpy.and.returnValue(DEFAULT_TARGET_API - 1);
+
+        //     var target = check_reqs.get_target();
+
+        //     
expect(getPreferenceSpy).toHaveBeenCalledWith('android-targetSdkVersion', 
'android');
+        //     expect(target).toBe('android-' + DEFAULT_TARGET_API);
+        //     expect(events.emit).toHaveBeenCalledWith('warn', 
'android-targetSdkVersion should be greater than or equal to ' + 
DEFAULT_TARGET_API + '.');
+        // });

Review comment:
       check_reqs get target was modified, but I think those changes were 
suppose to be a part of https://github.com/apache/cordova-android/pull/1212 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to