This is an automated email from the ASF dual-hosted git repository.

purplecabbage pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-browser.git


The following commit(s) were added to refs/heads/master by this push:
     new 8560888  LINTINGOMGURSOSTRICT
8560888 is described below

commit 85608884499571ddda34155e349e6cc61cd9b834
Author: Jesse MacFadyen <[email protected]>
AuthorDate: Tue Dec 5 23:03:31 2017 -0800

    LINTINGOMGURSOSTRICT
---
 bin/template/cordova/browser_handler.js |  2 +-
 spec/browser_handler.spec.js            | 17 ++++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/bin/template/cordova/browser_handler.js 
b/bin/template/cordova/browser_handler.js
index ae699e4..bccddb4 100644
--- a/bin/template/cordova/browser_handler.js
+++ b/bin/template/cordova/browser_handler.js
@@ -117,7 +117,7 @@ module.exports = {
             var src = path.join(plugin_dir, asset.src);
             var dest = path.join(wwwDest, asset.target);
             var destDir = path.parse(dest).dir;
-            if(destDir != '' && !fs.existsSync(destDir)) {
+            if (destDir !== '' && !fs.existsSync(destDir)) {
                 shell.mkdir('-p', destDir);
             }
 
diff --git a/spec/browser_handler.spec.js b/spec/browser_handler.spec.js
index 8fe71d7..ad73be0 100644
--- a/spec/browser_handler.spec.js
+++ b/spec/browser_handler.spec.js
@@ -25,14 +25,14 @@ var path = require('path');
 describe('Asset install tests', function () {
     var fsstatMock;
     var asset = { itemType: 'asset',
-                  src: path.join('someSrc', 'ServiceWorker.js'),
-                  target: 'ServiceWorker.js' };
+        src: path.join('someSrc', 'ServiceWorker.js'),
+        target: 'ServiceWorker.js' };
     var assetWithPath = { itemType: 'asset',
-                          src: path.join('someSrc', 'reformat.js'),
-                          target: path.join('js', 'deepdown', 'reformat.js') };
+        src: path.join('someSrc', 'reformat.js'),
+        target: path.join('js', 'deepdown', 'reformat.js') };
     var assetWithPath2 = { itemType: 'asset',
-                           src: path.join('someSrc', 'reformat.js'),
-                           target: path.join('js', 'deepdown', 'reformat2.js') 
};
+        src: path.join('someSrc', 'reformat.js'),
+        target: path.join('js', 'deepdown', 'reformat2.js') };
 
     var plugin_dir = 'pluginDir';
     var wwwDest = 'dest';
@@ -51,7 +51,7 @@ describe('Asset install tests', function () {
     it('if src is not a directory and asset has no path, should be called with 
cp, -f', function () {
         var cp = spyOn(shell, 'cp').and.returnValue('-f');
         var mkdir = spyOn(shell, 'mkdir');
-        var exSync = spyOn(fs, 'existsSync').and.returnValue(true);
+        spyOn(fs, 'existsSync').and.returnValue(true);
         fsstatMock = {
             isDirectory: function () {
                 return false;
@@ -82,10 +82,9 @@ describe('Asset install tests', function () {
         /*
             Now test that a second call to the same dest folder skips mkdir 
because the first asset call should have created it.
         */
-        var exSync = spyOn(fs, 'existsSync').and.returnValue(true);
+        spyOn(fs, 'existsSync').and.returnValue(true);
         browser_handler.asset.install(assetWithPath2, plugin_dir, wwwDest);
         expect(mkdir.calls.count()).toBe(1); // not called again
 
-
     });
 });

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

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

Reply via email to