Add/fix test for CB-10423. This closes #364
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/7c707794 Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/7c707794 Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/7c707794 Branch: refs/heads/master Commit: 7c7077940570b3101d41b92ff446ecbc87e3df14 Parents: 43a6386 Author: Jesse MacFadyen <[email protected]> Authored: Sat Jan 23 20:45:35 2016 -0800 Committer: Steve Gill <[email protected]> Committed: Sun Jan 24 21:09:29 2016 -0800 ---------------------------------------------------------------------- cordova-lib/spec-plugman/fetch.spec.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/7c707794/cordova-lib/spec-plugman/fetch.spec.js ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-plugman/fetch.spec.js b/cordova-lib/spec-plugman/fetch.spec.js index cd9d3d5..8b5c625 100644 --- a/cordova-lib/spec-plugman/fetch.spec.js +++ b/cordova-lib/spec-plugman/fetch.spec.js @@ -251,15 +251,26 @@ describe('fetch', function() { var srcDir = path.join(__dirname, 'plugins/recursivePlug'); var appDir = path.join(__dirname, 'plugins/recursivePlug/demo'); + + if(/^win/.test(process.platform)) { + it('should copy all but the /demo/ folder',function(done) { + var cp = spyOn(shell, 'cp'); + wrapper(fetch(srcDir, appDir),done, function() { + expect(cp).toHaveBeenCalledWith('-R',path.join(srcDir,'asset.txt'),path.join(appDir,'test-recursive')); + expect(cp).not.toHaveBeenCalledWith('-R',srcDir,path.join(appDir,'test-recursive')); + }); + }); + } + else { + it('should skip copy to avoid recursive error', function(done) { - it('should skip copy to avoid recursive error', function(done) { - - var cp = spyOn(shell, 'cp').andCallFake(function(){}); + var cp = spyOn(shell, 'cp').andCallFake(function(){}); - wrapper(fetch(srcDir, appDir),done, function() { - expect(cp).not.toHaveBeenCalled(); + wrapper(fetch(srcDir, appDir),done, function() { + expect(cp).not.toHaveBeenCalled(); + }); }); - }); + } }); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
