It passed then failed. I'll change the test for now, because perfect is the enemy of good.

This commit is contained in:
Joe Bowser 2017-07-18 11:52:37 -07:00
parent b65af106ff
commit 00c879e27d
2 changed files with 2 additions and 5 deletions

View File

@ -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);
};

View File

@ -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);
});
});