sagrawal31 commented on a change in pull request #1173:
URL: https://github.com/apache/cordova-android/pull/1173#discussion_r601747801
##########
File path: spec/unit/create.spec.js
##########
@@ -300,4 +301,23 @@ describe('create', function () {
});
});
});
+
+ describe('writeNameForAndroidStudio', () => {
+ var project_path = path.join('some', 'path');
+
+ it('should call ensureDirSync with path', () => {
+ spyOn(fs, 'ensureDirSync');
+ spyOn(fs, 'writeFileSync');
+ create.writeNameForAndroidStudio(project_path, 'Test Android');
+
expect(fs.ensureDirSync).toHaveBeenCalledWith(path.join(project_path, '.idea'));
+ });
+
+ it('should call writeFileSync with content', () => {
+ var appName = 'Test Cordova';
+ spyOn(fs, 'ensureDirSync');
+ spyOn(fs, 'writeFileSync');
Review comment:
Made the code DRY.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]