Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

fix: require use of new #99

Merged
merged 2 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ system-test/*key.json
*.lock
.DS_Store
google-cloud-logging-winston-*.tgz
google-cloud-logging-bunyan-*.tgz
google-cloud-logging-bunyan-*.tgz

This comment was marked as spam.

This comment was marked as spam.

.vscode
4 changes: 0 additions & 4 deletions 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 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