CB-12895 : fixed eslint errors

This commit is contained in:
Audrey So
2017-06-13 11:42:20 -07:00
parent e36158a0da
commit d83d49d83b
40 changed files with 3176 additions and 3325 deletions
+8 -7
View File
@@ -1,22 +1,23 @@
var gradle_builder = require('../../../bin/templates/cordova/lib/builders/GradleBuilder.js');
/* eslint-env jasmine */
var Gradle_builder = require('../../../bin/templates/cordova/lib/builders/GradleBuilder.js');
var fs = require('fs');
var superspawn = require('cordova-common').superspawn;
var builder;
describe('Gradle Builder', function() {
beforeEach(function() {
describe('Gradle Builder', function () {
beforeEach(function () {
spyOn(fs, 'existsSync').and.returnValue(true);
builder = new gradle_builder('/root');
builder = new Gradle_builder('/root');
spyOn(superspawn, 'spawn');
});
describe('runGradleWrapper method', function() {
it('should run the provided gradle command if a gradle wrapper does not already exist', function() {
describe('runGradleWrapper method', function () {
it('should run the provided gradle command if a gradle wrapper does not already exist', function () {
fs.existsSync.and.returnValue(false);
builder.runGradleWrapper('/my/sweet/gradle');
expect(superspawn.spawn).toHaveBeenCalledWith('/my/sweet/gradle', jasmine.any(Array), jasmine.any(Object));
});
it('should do nothing if a gradle wrapper exists in the project directory', function() {
it('should do nothing if a gradle wrapper exists in the project directory', function () {
fs.existsSync.and.returnValue(true);
builder.runGradleWrapper('/my/sweet/gradle');
expect(superspawn.spawn).not.toHaveBeenCalledWith('/my/sweet/gradle', jasmine.any(Array), jasmine.any(Object));