@@ -25,8 +25,8 @@ const projectId = process.env.GCLOUD_PROJECT;
25
25
const hostname = 'mydomain.com' ;
26
26
27
27
function getResourceObjects ( output ) {
28
- let regex = new RegExp ( / ^ \s * R e s o u r c e : ( .* ) $ / gm) ;
29
- let result = [ ] ;
28
+ const regex = new RegExp ( / ^ \s * R e s o u r c e : ( .* ) $ / gm) ;
29
+ const result = [ ] ;
30
30
let match ;
31
31
while ( ( match = regex . exec ( output ) ) !== null ) {
32
32
result . push ( JSON . parse ( match [ 1 ] ) ) ;
@@ -50,7 +50,7 @@ test.serial(`should create an uptime check`, async t => {
50
50
) ;
51
51
id = matches [ 1 ] ;
52
52
t . regex ( output , / U p t i m e c h e c k c r e a t e d : / ) ;
53
- let resources = getResourceObjects ( output ) ;
53
+ const resources = getResourceObjects ( output ) ;
54
54
t . is ( resources [ 0 ] [ 'type' ] , 'uptime_url' ) ;
55
55
t . is ( resources [ 0 ] [ 'labels' ] [ 'host' ] , hostname ) ;
56
56
t . regex ( output , / D i s p l a y N a m e : M y U p t i m e C h e c k / ) ;
@@ -63,7 +63,7 @@ test.serial(`should get an uptime check`, async t => {
63
63
output ,
64
64
new RegExp ( `Retrieving projects/${ projectId } /uptimeCheckConfigs/${ id } ` )
65
65
) ;
66
- let resources = getResourceObjects ( output ) ;
66
+ const resources = getResourceObjects ( output ) ;
67
67
t . is ( resources [ 0 ] [ 'type' ] , 'uptime_url' ) ;
68
68
t . is ( resources [ 0 ] [ 'labels' ] [ 'host' ] , hostname ) ;
69
69
} ) ;
@@ -74,7 +74,7 @@ test.serial(`should list uptime checks`, async t => {
74
74
. tryTest ( async assert => {
75
75
const results = await tools . runAsyncWithIO ( `${ cmd } list` , cwd ) ;
76
76
const output = results . stdout + results . stderr ;
77
- let resources = getResourceObjects ( output ) ;
77
+ const resources = getResourceObjects ( output ) ;
78
78
assert (
79
79
resources . filter (
80
80
resource =>
0 commit comments