cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] brodybits commented on a change in pull request #246: CB-13829 Fix tests that were broken since CB-13237
Date Thu, 01 Jan 1970 00:00:00 GMT
brodybits commented on a change in pull request #246: CB-13829 Fix tests that were broken since
CB-13237
URL: https://github.com/apache/cordova-windows/pull/246#discussion_r166689447
 
 

 ##########
 File path: spec/e2e/endtoend.spec.js
 ##########
 @@ -34,15 +34,32 @@ describe('Cordova create and build', function () {
     var buildDirectory = path.join(__dirname, '../..');
     var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages');
     var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build')
+ '"';
+    var silent = false;
+
+    function verifySubDirContainsFile (subDirName, fileName, count) {
+        count = typeof count !== 'undefined' ? count : 1;
 
-    function verifySubDirContainsFile (subDirName, fileName) {
         var subDir = path.join(appPackagesFolder, subDirName);
         var packages = shell.ls(subDir);
-        expect(packages.filter(function (file) { return file.match(fileName); }).length).toBe(1);
+        expect(packages.filter(function (file) { return file.match(fileName); }).length).toBe(count);
+    }
+
+    function _expectExist (fileNamePattern, count) {
+        count = typeof count !== 'undefined' ? count : 1;
+
+        var packages = shell.ls(appPackagesFolder);
+        expect(packages.filter(function (file) { return file.match(fileNamePattern); }).length).toBe(count);
+    }
+
+    function _expectSubdirAndFileExist (subDirName, fileName, count) {
 
 Review comment:
   I would rename to something like `verifySubdirExistsAndContansFile` (or maybe `checkSubdirExistsAndContainsFile`
(I think more consistenst and less ugly)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message