Skip to content

Commit

Permalink
fix: require use of new (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Jun 12, 2018
1 parent 9e7d58a commit 228adc7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions packages/google-cloud-compute/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ var Image = require('./image.js');
* });
*/
function Compute(options) {
if (!(this instanceof Compute)) {
return new Compute(options);
}

options = common.util.normalizeArguments(this, options);

var config = {
Expand Down
6 changes: 0 additions & 6 deletions packages/google-cloud-compute/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@ describe('Compute', function() {
assert(compute instanceof Compute);
});

it('should work without new', function() {
assert.doesNotThrow(function() {
Compute({projectId: PROJECT_ID});
});
});

it('should normalize the arguments', function() {
var normalizeArgumentsCalled = false;
var options = {};
Expand Down

0 comments on commit 228adc7

Please sign in to comment.