Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should inherit from GrpcService', function() {
assert(logging instanceof FakeGrpcService);
var calledWith = logging.calledWith_[0];
assert.strictEqual(calledWith.baseUrl, 'logging.googleapis.com');
assert.strictEqual(calledWith.service, 'logging');
assert.strictEqual(calledWith.apiVersion, 'v2');
assert.deepEqual(calledWith.protoServices, {
ConfigServiceV2:
googleProtoFiles('logging', 'v2', 'logging_config.proto'),
LoggingServiceV2: googleProtoFiles.logging.v2
});
assert.deepEqual(calledWith.scopes, [
'https://www.googleapis.com/auth/cloud-platform'
]);
});
});
function Logging(options) {
if (!(this instanceof Logging)) {
options = util.normalizeArguments(this, options);
return new Logging(options);
}
var config = {
baseUrl: 'logging.googleapis.com',
service: 'logging',
apiVersion: 'v2',
protoServices: {
ConfigServiceV2:
googleProtoFiles('logging', 'v2', 'logging_config.proto'),
LoggingServiceV2: googleProtoFiles.logging.v2
},
scopes: [
'https://www.googleapis.com/auth/cloud-platform'
],
userAgent: PKG.name + '/' + PKG.version
};
GrpcService.call(this, config, options);
}