Skip to content

Commit 48748c9

Browse files
committed
Fix syntax errors
1 parent d721944 commit 48748c9

26 files changed

+55
-110
lines changed

deploy/googleDeploy.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class GoogleDeploy {
3030
uploadArtifacts,
3131
compileFunctions,
3232
updateDeployment,
33-
cleanupDeploymentBucket,
34-
);
33+
cleanupDeploymentBucket);
3534

3635
this.hooks = {
3736
'before:deploy:initialize': () => BbPromise.bind(this)

deploy/googleDeploy.test.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@ describe('GoogleDeploy', () => {
8484
.hooks['before:deploy:initialize']().then(() => {
8585
expect(validateStub.calledOnce).toEqual(true);
8686
expect(setDefaultsStub.calledAfter(validateStub)).toEqual(true);
87-
}),
88-
);
87+
}));
8988

9089
it('should run "deploy:initialize" promise chain', () => googleDeploy
9190
.hooks['deploy:initialize']().then(() => {
9291
expect(prepareDeploymentStub.calledOnce).toEqual(true);
93-
}),
94-
);
92+
}));
9593

9694
it('it should run "deploy:setupProviderConfiguration" promise chain', () => googleDeploy
9795
.hooks['deploy:setupProviderConfiguration']().then(() => {
@@ -103,16 +101,14 @@ describe('GoogleDeploy', () => {
103101
.hooks['before:deploy:compileFunctions']().then(() => {
104102
expect(generateArtifactDirectoryNameStub.calledOnce).toEqual(true);
105103
expect(compileFunctionsStub.calledAfter(generateArtifactDirectoryNameStub)).toEqual(true);
106-
}),
107-
);
104+
}));
108105

109106
it('should run "deploy:deploy" promise chain', () => googleDeploy
110107
.hooks['deploy:deploy']().then(() => {
111108
expect(uploadArtifactsStub.calledOnce).toEqual(true);
112109
expect(updateDeploymentStub.calledAfter(uploadArtifactsStub)).toEqual(true);
113110
expect(cleanupDeploymentBucketStub.calledAfter(updateDeploymentStub)).toEqual(true);
114-
}),
115-
);
111+
}));
116112
});
117113
});
118114
});

deploy/lib/cleanupDeploymentBucket.test.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ describe('CleanupDeploymentBucket', () => {
4646
.cleanupDeploymentBucket().then(() => {
4747
expect(getObjectsToRemoveStub.calledOnce).toEqual(true);
4848
expect(removeObjectsStub.calledAfter(getObjectsToRemoveStub));
49-
}),
50-
);
49+
}));
5150
});
5251

5352
describe('#getObjectsToRemove()', () => {
@@ -116,8 +115,7 @@ describe('CleanupDeploymentBucket', () => {
116115
'list',
117116
{
118117
bucket: 'sls-my-service-dev',
119-
},
120-
)).toEqual(true);
118+
})).toEqual(true);
121119
});
122120
});
123121

@@ -153,8 +151,7 @@ describe('CleanupDeploymentBucket', () => {
153151
'list',
154152
{
155153
bucket: 'sls-my-service-dev',
156-
},
157-
)).toEqual(true);
154+
})).toEqual(true);
158155
});
159156
});
160157

@@ -173,8 +170,7 @@ describe('CleanupDeploymentBucket', () => {
173170
'list',
174171
{
175172
bucket: 'sls-my-service-dev',
176-
},
177-
)).toEqual(true);
173+
})).toEqual(true);
178174
});
179175
});
180176
});

deploy/lib/compileFunctions.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ module.exports = {
2828
this.options.region,
2929
`gs://sls-${
3030
this.serverless.service.service
31-
}-${this.options.stage}/${this.serverless.service.package.artifactFilePath}`,
32-
);
31+
}-${this.options.stage}/${this.serverless.service.package.artifactFilePath}`);
3332

3433
const eventType = Object.keys(funcObject.events[0])[0];
3534

deploy/lib/createDeployment.test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ describe('CreateDeployment', () => {
3535
configurationTemplateCreateFilePath = path.join(
3636
serverless.config.servicePath,
3737
'.serverless',
38-
'configuration-template-create.yml',
39-
);
38+
'configuration-template-create.yml');
4039
});
4140

4241
afterEach(() => {

deploy/lib/prepareDeployment.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ module.exports = {
1616
__dirname,
1717
'..',
1818
'templates',
19-
'core-configuration-template.yml'),
20-
);
19+
'core-configuration-template.yml'));
2120

2221
const bucket = deploymentTemplate.resources.find(findDeploymentBucket);
2322
const name = `sls-${this.serverless.service.service}-${this.options.stage}`;

deploy/lib/updateDeployment.test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ describe('UpdateDeployment', () => {
3535
configurationTemplateUpdateFilePath = path.join(
3636
serverless.config.servicePath,
3737
'.serverless',
38-
'configuration-template-update.yml',
39-
);
38+
'configuration-template-update.yml');
4039
});
4140

4241
afterEach(() => {

deploy/lib/uploadArtifacts.test.js

+6-12
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ describe('UploadArtifacts', () => {
5959
mimeType: 'application/octet-stream',
6060
body: fs.createReadStream('artifact.zip'),
6161
},
62-
},
63-
)).toEqual(true);
64-
}),
65-
);
62+
})).toEqual(true);
63+
}));
6664

6765
it('should log info messages', () => googleDeploy
6866
.uploadArtifacts().then(() => {
@@ -81,10 +79,8 @@ describe('UploadArtifacts', () => {
8179
mimeType: 'application/octet-stream',
8280
body: fs.createReadStream('artifact.zip'),
8381
},
84-
},
85-
)).toEqual(true);
86-
}),
87-
);
82+
})).toEqual(true);
83+
}));
8884

8985
it('should read artifact file as read stream', () => googleDeploy
9086
.uploadArtifacts().then(() => {
@@ -103,9 +99,7 @@ describe('UploadArtifacts', () => {
10399
mimeType: 'application/octet-stream',
104100
body: fs.createReadStream('artifact.zip'),
105101
},
106-
},
107-
)).toEqual(true);
108-
}),
109-
);
102+
})).toEqual(true);
103+
}));
110104
});
111105
});

info/googleInfo.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ class GoogleInfo {
1616
this,
1717
validate,
1818
setDefaults,
19-
displayServiceInfo,
20-
);
19+
displayServiceInfo);
2120

2221
this.hooks = {
2322
'before:info:info': () => BbPromise.bind(this)

info/googleInfo.test.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,17 @@ describe('GoogleInfo', () => {
5959
.hooks['before:info:info']().then(() => {
6060
expect(validateStub.calledOnce).toEqual(true);
6161
expect(setDefaultsStub.calledAfter(validateStub)).toEqual(true);
62-
}),
63-
);
62+
}));
6463

6564
it('should run "deploy:deploy" promise chain', () => googleInfo
6665
.hooks['deploy:deploy']().then(() => {
6766
expect(displayServiceInfoStub.calledOnce).toEqual(true);
68-
}),
69-
);
67+
}));
7068

7169
it('should run "info:info" promise chain', () => googleInfo
7270
.hooks['info:info']().then(() => {
7371
expect(displayServiceInfoStub.calledOnce).toEqual(true);
74-
}),
75-
);
72+
}));
7673
});
7774
});
7875
});

info/lib/displayServiceInfo.test.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ describe('DisplayServiceInfo', () => {
7171
expect(getResourcesStub.calledOnce).toEqual(true);
7272
expect(gatherDataStub.calledAfter(getResourcesStub));
7373
expect(printInfoStub.calledAfter(gatherDataStub));
74-
}),
75-
);
74+
}));
7675
});
7776

7877
describe('#getResources()', () => {
@@ -95,10 +94,8 @@ describe('DisplayServiceInfo', () => {
9594
{
9695
project: 'my-project',
9796
deployment: 'sls-my-service-dev',
98-
},
99-
)).toEqual(true);
100-
}),
101-
);
97+
})).toEqual(true);
98+
}));
10299
});
103100

104101
describe('#gatherData()', () => {

invoke/googleInvoke.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ class GoogleInvoke {
1616
this,
1717
validate,
1818
setDefaults,
19-
invokeFunction,
20-
);
19+
invokeFunction);
2120

2221
this.hooks = {
2322
'before:invoke:invoke': () => BbPromise.bind(this)

invoke/googleInvoke.test.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,12 @@ describe('GoogleInvoke', () => {
5959
.hooks['before:invoke:invoke']().then(() => {
6060
expect(validateStub.calledOnce).toEqual(true);
6161
expect(setDefaultsStub.calledAfter(validateStub)).toEqual(true);
62-
}),
63-
);
62+
}));
6463

6564
it('should run "invoke:invoke" promise chain', () => googleInvoke
6665
.hooks['invoke:invoke']().then(() => {
6766
expect(invokeFunctionStub.calledOnce).toEqual(true);
68-
}),
69-
);
67+
}));
7068
});
7169
});
7270
});

invoke/lib/invokeFunction.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ module.exports = {
3333
'locations',
3434
'functions',
3535
'call',
36-
params,
37-
);
36+
params);
3837
},
3938

4039
getLogs() {

invoke/lib/invokeFunction.test.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ describe('InvokeFunction', () => {
5757
expect(invokeStub.calledOnce).toEqual(true);
5858
expect(getLogsStub.calledAfter(invokeStub));
5959
expect(printLogsStub.calledAfter(getLogsStub));
60-
}),
61-
);
60+
}));
6261
});
6362

6463
describe('#invoke()', () => {
@@ -87,8 +86,7 @@ describe('InvokeFunction', () => {
8786
resource: {
8887
data: '',
8988
},
90-
},
91-
)).toEqual(true);
89+
})).toEqual(true);
9290
});
9391
});
9492

@@ -108,8 +106,7 @@ describe('InvokeFunction', () => {
108106
resource: {
109107
data: googleInvoke.options.data,
110108
},
111-
},
112-
)).toEqual(true);
109+
})).toEqual(true);
113110
});
114111
});
115112

@@ -146,8 +143,7 @@ describe('InvokeFunction', () => {
146143
'projects/my-project',
147144
],
148145
pageSize: 2,
149-
},
150-
)).toEqual(true);
146+
})).toEqual(true);
151147
});
152148
});
153149

logs/googleLogs.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class GoogleLogs {
3030
this,
3131
validate,
3232
setDefaults,
33-
retrieveLogs,
34-
);
33+
retrieveLogs);
3534

3635
this.hooks = {
3736
'before:logs:logs': () => BbPromise.bind(this)

logs/googleLogs.test.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ describe('GoogleLogs', () => {
7777
.hooks['before:logs:logs']().then(() => {
7878
expect(validateStub.calledOnce).toEqual(true);
7979
expect(setDefaultsStub.calledAfter(validateStub)).toEqual(true);
80-
}),
81-
);
80+
}));
8281

8382
it('should run "logs:logs" promise chain', () => googleLogs
8483
.hooks['logs:logs']().then(() => {
8584
expect(retrieveLogsStub.calledOnce).toEqual(true);
86-
}),
87-
);
85+
}));
8886
});
8987
});
9088
});

logs/lib/retrieveLogs.test.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ describe('RetrieveLogs', () => {
5252
.retrieveLogs().then(() => {
5353
expect(getLogsStub.calledOnce).toEqual(true);
5454
expect(printLogsStub.calledAfter(getLogsStub));
55-
}),
56-
);
55+
}));
5756
});
5857

5958
describe('#getLogs()', () => {
@@ -82,8 +81,7 @@ describe('RetrieveLogs', () => {
8281
'projects/my-project',
8382
],
8483
pageSize: 1,
85-
},
86-
)).toEqual(true);
84+
})).toEqual(true);
8785
});
8886
});
8987

@@ -103,8 +101,7 @@ describe('RetrieveLogs', () => {
103101
'projects/my-project',
104102
],
105103
pageSize: googleLogs.options.count,
106-
},
107-
)).toEqual(true);
104+
})).toEqual(true);
108105
});
109106
});
110107

remove/googleRemove.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ class GoogleRemove {
2020
setDefaults,
2121
emptyDeploymentBucket,
2222
removeDeployment,
23-
monitorDeployment,
24-
);
23+
monitorDeployment);
2524

2625
this.hooks = {
2726
'before:remove:remove': () => BbPromise.bind(this)

remove/googleRemove.test.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,13 @@ describe('GoogleRemove', () => {
6363
.hooks['before:remove:remove']().then(() => {
6464
expect(validateStub.calledOnce).toEqual(true);
6565
expect(setDefaultsStub.calledAfter(validateStub)).toEqual(true);
66-
}),
67-
);
66+
}));
6867

6968
it('should run "remove:remove" promise chain', () => googleRemove
7069
.hooks['remove:remove']().then(() => {
7170
expect(emptyDeploymentBucketStub.calledOnce).toEqual(true);
7271
expect(removeDeploymentStub.calledAfter(emptyDeploymentBucketStub)).toEqual(true);
73-
}),
74-
);
72+
}));
7573
});
7674
});
7775
});

0 commit comments

Comments
 (0)