Skip to content

Commit

Permalink
Enable prefer-const in the eslint config (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and alexander-fenster committed Sep 20, 2018
1 parent 11b89d3 commit 629665d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions monitoring/snippets/system-test/uptime.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const projectId = process.env.GCLOUD_PROJECT;
const hostname = 'mydomain.com';

function getResourceObjects(output) {
let regex = new RegExp(/^\s*Resource: (.*)$/gm);
let result = [];
const regex = new RegExp(/^\s*Resource: (.*)$/gm);
const result = [];
let match;
while ((match = regex.exec(output)) !== null) {
result.push(JSON.parse(match[1]));
Expand All @@ -50,7 +50,7 @@ test.serial(`should create an uptime check`, async t => {
);
id = matches[1];
t.regex(output, /Uptime check created:/);
let resources = getResourceObjects(output);
const resources = getResourceObjects(output);
t.is(resources[0]['type'], 'uptime_url');
t.is(resources[0]['labels']['host'], hostname);
t.regex(output, /Display Name: My Uptime Check/);
Expand All @@ -63,7 +63,7 @@ test.serial(`should get an uptime check`, async t => {
output,
new RegExp(`Retrieving projects/${projectId}/uptimeCheckConfigs/${id}`)
);
let resources = getResourceObjects(output);
const resources = getResourceObjects(output);
t.is(resources[0]['type'], 'uptime_url');
t.is(resources[0]['labels']['host'], hostname);
});
Expand All @@ -74,7 +74,7 @@ test.serial(`should list uptime checks`, async t => {
.tryTest(async assert => {
const results = await tools.runAsyncWithIO(`${cmd} list`, cwd);
const output = results.stdout + results.stderr;
let resources = getResourceObjects(output);
const resources = getResourceObjects(output);
assert(
resources.filter(
resource =>
Expand Down

0 comments on commit 629665d

Please sign in to comment.