Skip to content

Commit

Permalink
test: remove prettier dep fixing linting (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Sep 25, 2020
1 parent 9cd232a commit 9e80fd0
Show file tree
Hide file tree
Showing 23 changed files with 575 additions and 570 deletions.
11 changes: 5 additions & 6 deletions packages/google-cloud-compute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,19 @@
"string-format-obj": "^1.1.1"
},
"devDependencies": {
"@microsoft/api-documenter": "^7.8.10",
"@microsoft/api-extractor": "^7.8.10",
"c8": "^7.0.0",
"codecov": "^3.0.2",
"concat-stream": "^2.0.0",
"gts": "^2.0.0",
"gts": "^2.0.2",
"jsdoc": "^3.6.2",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^2.0.0",
"mocha": "^8.0.0",
"c8": "^7.0.0",
"prettier": "^1.13.5",
"proxyquire": "^2.0.1",
"uuid": "^8.0.0",
"typescript": "^3.8.3",
"@microsoft/api-documenter": "^7.8.10",
"@microsoft/api-extractor": "^7.8.10"
"uuid": "^8.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/google-cloud-compute/src/health-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class HealthCheck extends common.ServiceObject {
* @type {string}
*/
id: name,
createMethod: function(name, options, callback) {
createMethod: function (name, options, callback) {
if (is.fn(options)) {
callback = options;
options = {};
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-compute/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,7 @@ class Compute extends common.Service {
* @returns {object} callback.apiResponse - The operation's final API response.
*/
execAfterOperation_(callback) {
return function(err) {
return function (err) {
// arguments = [..., op, apiResponse]
const operation = arguments[arguments.length - 2];
const apiResponse = arguments[arguments.length - 1];
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-compute/src/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Region extends common.ServiceObject {
this.name = name;
this.compute = compute;
this.interceptors.push({
request: function(reqOpts) {
request: function (reqOpts) {
if (reqOpts.uri.indexOf('/global/forwardingRules') > -1) {
reqOpts.uri = reqOpts.uri.replace('/global', '');
}
Expand Down
12 changes: 6 additions & 6 deletions packages/google-cloud-compute/test/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const promisify = require('@google-cloud/promisify');

let promisified = false;
const fakePromisify = Object.assign({}, promisify, {
promisifyAll: function(Class) {
promisifyAll: function (Class) {
if (Class.name === 'Address') {
promisified = true;
}
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('Address', () => {
it('should inherit from ServiceObject', done => {
const regionInstance = Object.assign({}, REGION, {
createAddress: {
bind: function(context) {
bind: function (context) {
assert.strictEqual(context, regionInstance);
done();
},
Expand All @@ -100,7 +100,7 @@ describe('Address', () => {

describe('delete', () => {
it('should make the correct API request', done => {
address.request = function(reqOpts) {
address.request = function (reqOpts) {
assert.strictEqual(reqOpts.method, 'DELETE');
assert.strictEqual(reqOpts.uri, '');
done();
Expand All @@ -114,7 +114,7 @@ describe('Address', () => {
const apiResponse = {a: 'b', c: 'd'};

beforeEach(() => {
address.request = function(reqOpts, callback) {
address.request = function (reqOpts, callback) {
callback(error, apiResponse);
};
});
Expand All @@ -141,15 +141,15 @@ describe('Address', () => {
};

beforeEach(() => {
address.request = function(reqOpts, callback) {
address.request = function (reqOpts, callback) {
callback(null, apiResponse);
};
});

it('should execute callback with Operation & Response', done => {
const operation = {};

address.region.operation = function(name) {
address.region.operation = function (name) {
assert.strictEqual(name, apiResponse.name);
return operation;
};
Expand Down
20 changes: 10 additions & 10 deletions packages/google-cloud-compute/test/autoscaler.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const promisify = require('@google-cloud/promisify');

let promisified = false;
const fakePromisify = Object.assign({}, promisify, {
promisifyAll: function(Class) {
promisifyAll: function (Class) {
if (Class.name === 'Autoscaler') {
promisified = true;
}
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('Autoscaler', () => {

const zoneInstance = Object.assign({}, ZONE, {
createAutoscaler: {
bind: function(context) {
bind: function (context) {
assert.strictEqual(context, zoneInstance);
return createMethod;
},
Expand All @@ -106,7 +106,7 @@ describe('Autoscaler', () => {

describe('delete', () => {
it('should call ServiceObject.delete', done => {
FakeServiceObject.prototype.delete = function() {
FakeServiceObject.prototype.delete = function () {
assert.strictEqual(this, autoscaler);
done();
};
Expand All @@ -119,7 +119,7 @@ describe('Autoscaler', () => {
const apiResponse = {a: 'b', c: 'd'};

beforeEach(() => {
FakeServiceObject.prototype.delete = function(callback) {
FakeServiceObject.prototype.delete = function (callback) {
callback(error, apiResponse);
};
});
Expand All @@ -146,15 +146,15 @@ describe('Autoscaler', () => {
};

beforeEach(() => {
FakeServiceObject.prototype.delete = function(callback) {
FakeServiceObject.prototype.delete = function (callback) {
callback(null, apiResponse);
};
});

it('should execute callback with Operation & Response', done => {
const operation = {};

autoscaler.zone.operation = function(name) {
autoscaler.zone.operation = function (name) {
assert.strictEqual(name, apiResponse.name);
return operation;
};
Expand All @@ -180,7 +180,7 @@ describe('Autoscaler', () => {
it('should make the correct API request', done => {
const metadata = {};

autoscaler.zone.request = function(reqOpts) {
autoscaler.zone.request = function (reqOpts) {
assert.strictEqual(reqOpts.method, 'PATCH');
assert.strictEqual(reqOpts.uri, '/autoscalers');
assert.strictEqual(reqOpts.json, metadata);
Expand All @@ -200,7 +200,7 @@ describe('Autoscaler', () => {
const apiResponse = {a: 'b', c: 'd'};

beforeEach(() => {
autoscaler.zone.request = function(reqOpts, callback) {
autoscaler.zone.request = function (reqOpts, callback) {
callback(error, apiResponse);
};
});
Expand All @@ -221,7 +221,7 @@ describe('Autoscaler', () => {
};

beforeEach(() => {
autoscaler.zone.request = function(reqOpts, callback) {
autoscaler.zone.request = function (reqOpts, callback) {
callback(null, apiResponse);
};
});
Expand All @@ -230,7 +230,7 @@ describe('Autoscaler', () => {
const operation = {};
const metadata = {a: 'b'};

autoscaler.zone.operation = function(name) {
autoscaler.zone.operation = function (name) {
assert.strictEqual(name, apiResponse.name);
return operation;
};
Expand Down
24 changes: 12 additions & 12 deletions packages/google-cloud-compute/test/disk.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const promisify = require('@google-cloud/promisify');

let promisified = false;
const fakePromisify = Object.assign({}, promisify, {
promisifyAll: function(Class, options) {
promisifyAll: function (Class, options) {
if (Class.name !== 'Disk') {
return;
}
Expand Down Expand Up @@ -95,7 +95,7 @@ describe('Disk', () => {
const formatName_ = Disk.formatName_;
const formattedName = 'projects/a/zones/b/disks/c';

Disk.formatName_ = function(zone, name) {
Disk.formatName_ = function (zone, name) {
Disk.formatName_ = formatName_;

assert.strictEqual(zone, ZONE);
Expand All @@ -111,7 +111,7 @@ describe('Disk', () => {
it('should inherit from ServiceObject', done => {
const zoneInstance = Object.assign({}, ZONE, {
createDisk: {
bind: function(context) {
bind: function (context) {
assert.strictEqual(context, zoneInstance);
done();
},
Expand Down Expand Up @@ -144,7 +144,7 @@ describe('Disk', () => {

describe('createSnapshot', () => {
it('should make the correct API request', done => {
disk.request = function(reqOpts) {
disk.request = function (reqOpts) {
assert.strictEqual(reqOpts.method, 'POST');
assert.strictEqual(reqOpts.uri, '/createSnapshot');
assert.deepStrictEqual(reqOpts.json, {name: 'test', a: 'b'});
Expand All @@ -159,7 +159,7 @@ describe('Disk', () => {
const apiResponse = {a: 'b', c: 'd'};

beforeEach(() => {
disk.request = function(reqOpts, callback) {
disk.request = function (reqOpts, callback) {
callback(error, apiResponse);
};
});
Expand Down Expand Up @@ -187,7 +187,7 @@ describe('Disk', () => {
};

beforeEach(() => {
disk.request = function(reqOpts, callback) {
disk.request = function (reqOpts, callback) {
callback(null, apiResponse);
};
});
Expand All @@ -196,12 +196,12 @@ describe('Disk', () => {
const snapshot = {};
const operation = {};

disk.snapshot = function(name) {
disk.snapshot = function (name) {
assert.strictEqual(name, 'test');
return snapshot;
};

disk.zone.operation = function(name) {
disk.zone.operation = function (name) {
assert.strictEqual(name, apiResponse.name);
return operation;
};
Expand All @@ -228,7 +228,7 @@ describe('Disk', () => {

describe('delete', () => {
it('should call ServiceObject.delete', done => {
FakeServiceObject.prototype.delete = function() {
FakeServiceObject.prototype.delete = function () {
assert.strictEqual(this, disk);
done();
};
Expand All @@ -241,7 +241,7 @@ describe('Disk', () => {
const apiResponse = {a: 'b', c: 'd'};

beforeEach(() => {
FakeServiceObject.prototype.delete = function(callback) {
FakeServiceObject.prototype.delete = function (callback) {
callback(error, apiResponse);
};
});
Expand All @@ -268,15 +268,15 @@ describe('Disk', () => {
};

beforeEach(() => {
FakeServiceObject.prototype.delete = function(callback) {
FakeServiceObject.prototype.delete = function (callback) {
callback(null, apiResponse);
};
});

it('should execute callback with Operation & Response', done => {
const operation = {};

disk.zone.operation = function(name) {
disk.zone.operation = function (name) {
assert.strictEqual(name, apiResponse.name);
return operation;
};
Expand Down
Loading

0 comments on commit 9e80fd0

Please sign in to comment.