Skip to content

Commit 358e205

Browse files
committed
Fix coding standard violations
1 parent 84f6d2e commit 358e205

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

lib/deploy/events/apiGateway/methods.test.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,18 +244,17 @@ describe('#methods()', () => {
244244
});
245245

246246
describe('#getMethodAuthorization()', () => {
247-
it('should return resource properties with AuthorizationType: NONE if no authorizer provided', () => {
247+
it('should return properties with AuthorizationType: NONE if no authorizer provided', () => {
248248
const event = {
249249
path: 'foo/bar1',
250-
method: 'post'
250+
method: 'post',
251251
};
252252

253253
expect(serverlessStepFunctions.getMethodAuthorization(event)
254254
.Properties.AuthorizationType).to.equal('NONE');
255255
});
256256

257257
it('should return resource properties with AuthorizationType: AWS_IAM', () => {
258-
259258
const event = {
260259
authorizer: {
261260
type: 'AWS_IAM',
@@ -267,8 +266,7 @@ describe('#methods()', () => {
267266
.Properties.AuthorizationType).to.equal('AWS_IAM');
268267
});
269268

270-
it('should return resource properties with AuthorizationType: CUSTOM and authotizerId', () => {
271-
269+
it('should return properties with AuthorizationType: CUSTOM and authotizerId', () => {
272270
const event = {
273271
authorizer: {
274272
type: 'CUSTOM',
@@ -280,10 +278,9 @@ describe('#methods()', () => {
280278
.Properties.AuthorizationType).to.equal('CUSTOM');
281279
expect(serverlessStepFunctions.getMethodAuthorization(event)
282280
.Properties.AuthorizerId).to.equal('foo12345');
283-
284281
});
285282

286-
it('should return resource properties with AuthorizationType: CUSTOM and resource reference', () => {
283+
it('should return properties with AuthorizationType: CUSTOM and resource reference', () => {
287284
const event = {
288285
authorizer: {
289286
name: 'authorizer',
@@ -293,23 +290,23 @@ describe('#methods()', () => {
293290
},
294291
};
295292

296-
const autorization = serverlessStepFunctions.getMethodAuthorization(event)
293+
const autorization = serverlessStepFunctions.getMethodAuthorization(event);
297294
expect(autorization.Properties.AuthorizationType)
298295
.to.equal('CUSTOM');
299296

300297
expect(autorization.Properties.AuthorizerId)
301298
.to.deep.equal({ Ref: 'AuthorizerApiGatewayAuthorizer' });
302299
});
303300

304-
it('should return resource properties with AuthorizationType: COGNITO_USER_POOLS and resource reference', () => {
301+
it('should return properties with AuthorizationType: COGNITO_USER_POOLS', () => {
305302
const event = {
306303
authorizer: {
307304
name: 'authorizer',
308305
arn: 'arn:aws:cognito-idp:us-east-1:xxx:userpool/us-east-1_ZZZ',
309306
},
310307
};
311308

312-
const autorization = serverlessStepFunctions.getMethodAuthorization(event)
309+
const autorization = serverlessStepFunctions.getMethodAuthorization(event);
313310
expect(autorization.Properties.AuthorizationType)
314311
.to.equal('COGNITO_USER_POOLS');
315312
expect(autorization.Properties.AuthorizerId)

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ class ServerlessStepFunctions {
105105
.then(this.compileActivities),
106106
'package:compileEvents': () =>
107107
this.compileScheduledEvents().then(() => {
108-
// FIXME: Rename pluginhttpValidated to validated so that we can use internal serverless libraries
108+
// FIXME: Rename pluginhttpValidated to validated
109+
// so that we can use internal serverless libraries
109110
this.validated = this.pluginhttpValidated = this.httpValidate();
110111

111112
if (this.pluginhttpValidated.events.length === 0) {

0 commit comments

Comments
 (0)