From 00c879e27dffd226cdafab9dace11d42a2edfe93 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 18 Jul 2017 11:52:37 -0700 Subject: [PATCH] It passed then failed. I'll change the test for now, because perfect is the enemy of good. --- bin/lib/create.js | 5 +---- spec/unit/create.spec.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/lib/create.js b/bin/lib/create.js index 293f22ba..fe076d8a 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -145,9 +145,6 @@ function writeProjectProperties (projectPath, target_api) { // This makes no sense, what if you're building with a different build system? function prepBuildFiles (projectPath, builder) { - if (builder === null) { - builder = 'studio'; - } var buildModule = require(path.resolve(projectPath, 'cordova/lib/builders/builders')); buildModule.getBuilder(builder).prepBuildFiles(); } @@ -335,7 +332,7 @@ exports.create = function (project_path, config, options, events) { }); // Link it to local android install. exports.writeProjectProperties(project_path, target_api); - exports.prepBuildFiles(project_path); + exports.prepBuildFiles(project_path, 'studio'); events.emit('log', generateDoneMessage('create', options.link)); }).thenResolve(project_path); }; diff --git a/spec/unit/create.spec.js b/spec/unit/create.spec.js index 7a568404..706786fc 100644 --- a/spec/unit/create.spec.js +++ b/spec/unit/create.spec.js @@ -274,7 +274,7 @@ describe('create', function () { }); it('should prepare build files', function (done) { create.create(project_path, config_mock, {}, events_mock).then(function () { - expect(create.prepBuildFiles).toHaveBeenCalledWith(project_path); + expect(create.prepBuildFiles).toHaveBeenCalledWith(project_path, 'studio'); }).fail(fail).done(done); }); });