Skip to content

Commit 1212e6a

Browse files
committed
chore: fixed tests
1 parent 33d3f00 commit 1212e6a

23 files changed

+92
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ describe('#methods()', () => {
2020
serverless.service.provider.compiledCloudFormationTemplate = {
2121
Resources: {},
2222
};
23+
serverless.configSchemaHandler = {
24+
// eslint-disable-next-line no-unused-vars
25+
defineTopLevelProperty: (propertyName, propertySchema) => {},
26+
};
2327
serverlessStepFunctions = new ServerlessStepFunctions(serverless, options);
2428
serverlessStepFunctions.serverless.service.stepFunctions = {
2529
stateMachines: {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ describe('#compileCors()', () => {
3232
},
3333
},
3434
};
35+
serverless.configSchemaHandler = {
36+
// eslint-disable-next-line no-unused-vars
37+
defineTopLevelProperty: (propertyName, propertySchema) => {},
38+
};
3539
awsCompileApigEvents = new ServerlessStepFunctions(serverless, options);
3640
awsCompileApigEvents.apiGatewayRestApiLogicalId = 'ApiGatewayRestApi';
3741
awsCompileApigEvents.apiGatewayResources = {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ describe('#compileDeployment()', () => {
1717
Resources: {},
1818
Outputs: {},
1919
};
20+
serverless.configSchemaHandler = {
21+
// eslint-disable-next-line no-unused-vars
22+
defineTopLevelProperty: (propertyName, propertySchema) => {},
23+
};
2024
const options = {
2125
stage: 'dev',
2226
region: 'us-east-1',

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ describe('#getEndpointInfo()', () => {
1818
serverless.setProvider('aws', new AwsProvider(serverless));
1919
serverless.service.provider.compiledCloudFormationTemplate = { Resources: {} };
2020
serverless.service.service = 'new-service';
21+
serverless.configSchemaHandler = {
22+
// eslint-disable-next-line no-unused-vars
23+
defineTopLevelProperty: (propertyName, propertySchema) => {},
24+
};
2125
serverlessStepFunctions = new ServerlessStepFunctions(serverless);
2226
});
2327

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ describe('#compileHttpIamRole()', () => {
2828
},
2929
},
3030
};
31+
serverless.configSchemaHandler = {
32+
// eslint-disable-next-line no-unused-vars
33+
defineTopLevelProperty: (propertyName, propertySchema) => {},
34+
};
3135
serverlessStepFunctions = new ServerlessStepFunctions(serverless);
3236
});
3337

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ describe('#compileHttpLambdaPermissions()', () => {
2121
},
2222
},
2323
};
24+
serverless.configSchemaHandler = {
25+
// eslint-disable-next-line no-unused-vars
26+
defineTopLevelProperty: (propertyName, propertySchema) => {},
27+
};
2428
serverlessStepFunctions = new ServerlessStepFunctions(serverless);
2529
});
2630

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ describe('#methods()', () => {
2020
serverless.service.provider.compiledCloudFormationTemplate = {
2121
Resources: {},
2222
};
23+
serverless.configSchemaHandler = {
24+
// eslint-disable-next-line no-unused-vars
25+
defineTopLevelProperty: (propertyName, propertySchema) => {},
26+
};
2327

2428
serverlessStepFunctions = new ServerlessStepFunctions(serverless, options);
2529
serverlessStepFunctions.apiGatewayRestApiLogicalId = 'ApiGatewayRestApi';

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ describe('#compileResources()', () => {
1313
serverless = new Serverless();
1414
serverless.setProvider('aws', new AwsProvider(serverless));
1515
serverless.service.provider.compiledCloudFormationTemplate = { Resources: {} };
16+
serverless.configSchemaHandler = {
17+
// eslint-disable-next-line no-unused-vars
18+
defineTopLevelProperty: (propertyName, propertySchema) => {},
19+
};
1620
serverlessStepFunctions = new ServerlessStepFunctions(serverless);
1721
serverlessStepFunctions.apiGatewayRestApiLogicalId = 'ApiGatewayRestApi';
1822
serverlessStepFunctions.pluginhttpValidated = {};

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ describe('#compileRestApi()', () => {
6161
serverless = new Serverless();
6262
serverless.setProvider('aws', new AwsProvider(serverless, options));
6363
serverless.service.provider.compiledCloudFormationTemplate = { Resources: {} };
64+
serverless.configSchemaHandler = {
65+
// eslint-disable-next-line no-unused-vars
66+
defineTopLevelProperty: (propertyName, propertySchema) => {},
67+
};
6468
serverlessStepFunctions = new ServerlessStepFunctions(serverless, options);
6569
serverlessStepFunctions.serverless.service.service = 'new-service';
6670
serverlessStepFunctions.serverless.service.functions = {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ describe('#compileUsagePlan()', () => {
2121
serverless.service.provider.compiledCloudFormationTemplate = {
2222
Resources: {},
2323
};
24+
serverless.configSchemaHandler = {
25+
// eslint-disable-next-line no-unused-vars
26+
defineTopLevelProperty: (propertyName, propertySchema) => {},
27+
};
2428
serverlessStepFunctions = new ServerlessStepFunctions(serverless, options);
2529
serverlessStepFunctions.serverless.service.stepFunctions = {
2630
stateMachines: {

0 commit comments

Comments
 (0)