Skip to content

Commit

Permalink
build!: update to latest version of gts and typescript (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl authored Apr 15, 2020
1 parent 148124b commit 2d84f02
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions compute/deleteVM.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017, Google, Inc.
// Copyright 2020, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand Down Expand Up @@ -31,7 +31,7 @@ async function main(
const vm = zone.vm(name);
const [operation] = await vm.delete();
await operation.promise();
console.log(`VM deleted!`);
console.log('VM deleted!');
}
deleteVM();
// [END gce_delete_vm]
Expand Down
3 changes: 2 additions & 1 deletion compute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"author": "Google Inc.",
"repository": "googleapis/nodejs-compute",
"files": [
"*.js"
"*.js",
"!test/"
],
"engines": {
"node": ">=8"
Expand Down
28 changes: 14 additions & 14 deletions compute/test/mailjet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,41 @@

'use strict';

const proxyquire = require(`proxyquire`).noPreserveCache();
const proxyquire = require('proxyquire').noPreserveCache();
const assert = require('assert');

process.env.MAILJET_API_KEY = `foo`;
process.env.MAILJET_API_SECRET = `bar`;
process.env.MAILJET_API_KEY = 'foo';
process.env.MAILJET_API_SECRET = 'bar';

describe('mailjet', () => {
it('should send an email', () => {
proxyquire(`../mailjet`, {
proxyquire('../mailjet', {
nodemailer: {
createTransport: arg => {
assert.strictEqual(arg, `test`);
assert.strictEqual(arg, 'test');
return {
sendMail: payload => {
assert.deepStrictEqual(payload, {
from: `ANOTHER_EMAIL@ANOTHER_EXAMPLE.COM`,
to: `EMAIL@EXAMPLE.COM`,
subject: `test email from Node.js on Google Cloud Platform`,
text: `Hello!\n\nThis a test email from Node.js.`,
from: 'ANOTHER_EMAIL@ANOTHER_EXAMPLE.COM',
to: 'EMAIL@EXAMPLE.COM',
subject: 'test email from Node.js on Google Cloud Platform',
text: 'Hello!\n\nThis a test email from Node.js.',
});
return `done`;
return 'done';
},
};
},
},
'nodemailer-smtp-transport': options => {
assert.deepStrictEqual(options, {
host: `in.mailjet.com`,
host: 'in.mailjet.com',
port: 2525,
auth: {
user: `foo`,
pass: `bar`,
user: 'foo',
pass: 'bar',
},
});
return `test`;
return 'test';
},
});
});
Expand Down
6 changes: 3 additions & 3 deletions compute/test/sendgrid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
const proxyquire = require('proxyquire');
const {assert} = require('chai');

process.env.SENDGRID_API_KEY = `foo`;
process.env.SENDGRID_API_KEY = 'foo';

describe('sendgrid', () => {
it('should send an email', () => {
proxyquire(`../sendgrid`, {
proxyquire('../sendgrid', {
'@sendgrid/mail': {
setApiKey: key => {
assert.strictEqual(key, `foo`);
assert.strictEqual(key, 'foo');
},
send: msg => {
assert.deepStrictEqual(msg, {
Expand Down

0 comments on commit 2d84f02

Please sign in to comment.