Skip to content

Commit f7671b0

Browse files
committed
chore: minor tweak
1 parent 4b4e003 commit f7671b0

File tree

1 file changed

+21
-37
lines changed

1 file changed

+21
-37
lines changed

lib/apiGateway/validate.test.js

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ describe('#validateServiceProxies()', () => {
13301330
)
13311331
})
13321332

1333-
it('should throw if "tableName" is not a string or an AWS intrinsic "Ref" function', () => {
1333+
it('should throw if the "tableName" is not a string or an AWS intrinsic "Ref" function', () => {
13341334
serverlessApigatewayServiceProxy.serverless.service.custom = {
13351335
apiGatewayServiceProxies: [
13361336
{
@@ -1349,7 +1349,7 @@ describe('#validateServiceProxies()', () => {
13491349
)
13501350
})
13511351

1352-
it('should throw if "tableName" is set to an object that is not an AWS intrinsic Ref function', () => {
1352+
it('should throw if the "tableName" is set to an object that is not an AWS intrinsic Ref function', () => {
13531353
serverlessApigatewayServiceProxy.serverless.service.custom = {
13541354
apiGatewayServiceProxies: [
13551355
{
@@ -1367,7 +1367,7 @@ describe('#validateServiceProxies()', () => {
13671367
)
13681368
})
13691369

1370-
it('should not throw error if tableName is a string', () => {
1370+
it('should not throw error if the "tableName" is a string', () => {
13711371
serverlessApigatewayServiceProxy.serverless.service.custom = {
13721372
apiGatewayServiceProxies: [
13731373
{
@@ -1383,7 +1383,7 @@ describe('#validateServiceProxies()', () => {
13831383
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
13841384
})
13851385

1386-
it('should not throw error if tableName is an AWS intrinsic Ref function', () => {
1386+
it('should not throw error if the "tableName" is an AWS intrinsic Ref function', () => {
13871387
serverlessApigatewayServiceProxy.serverless.service.custom = {
13881388
apiGatewayServiceProxies: [
13891389
{
@@ -1399,23 +1399,7 @@ describe('#validateServiceProxies()', () => {
13991399
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
14001400
})
14011401

1402-
it('should not throw error if tableName is an AWS intrinsic Ref function', () => {
1403-
serverlessApigatewayServiceProxy.serverless.service.custom = {
1404-
apiGatewayServiceProxies: [
1405-
{
1406-
dynamodb: {
1407-
tableName: { Ref: 'DynamodbTableResourceId' },
1408-
path: 'dynamodb',
1409-
method: 'put'
1410-
}
1411-
}
1412-
]
1413-
}
1414-
1415-
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
1416-
})
1417-
1418-
it('should throw error if the "hashKey" property is missing when the method is post and the action is not given', () => {
1402+
it('should throw error if the "hashKey" is missing when the method is post and the action is not given', () => {
14191403
serverlessApigatewayServiceProxy.serverless.service.custom = {
14201404
apiGatewayServiceProxies: [
14211405
{
@@ -1433,7 +1417,7 @@ describe('#validateServiceProxies()', () => {
14331417
)
14341418
})
14351419

1436-
it('should throw error if the "hashKey" property is not a string when the method is post and the action is not given', () => {
1420+
it('should throw error if the "hashKey" is not a string when the method is post and the action is not given', () => {
14371421
serverlessApigatewayServiceProxy.serverless.service.custom = {
14381422
apiGatewayServiceProxies: [
14391423
{
@@ -1455,7 +1439,7 @@ describe('#validateServiceProxies()', () => {
14551439
)
14561440
})
14571441

1458-
it('should throw error if the "rangeKey" property is not a string when the method is post and the action is not given', () => {
1442+
it('should throw error if the "rangeKey" is not a string when the method is post and the action is not given', () => {
14591443
serverlessApigatewayServiceProxy.serverless.service.custom = {
14601444
apiGatewayServiceProxies: [
14611445
{
@@ -1478,7 +1462,7 @@ describe('#validateServiceProxies()', () => {
14781462
)
14791463
})
14801464

1481-
it('should not throw error if the "hashKey" property is missing when the method is post and the action is given', () => {
1465+
it('should not throw error if the "hashKey" is missing when the method is post and the action is given', () => {
14821466
serverlessApigatewayServiceProxy.serverless.service.custom = {
14831467
apiGatewayServiceProxies: [
14841468
{
@@ -1495,7 +1479,7 @@ describe('#validateServiceProxies()', () => {
14951479
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
14961480
})
14971481

1498-
it('should throw error if the "action" property is an invalid type given', () => {
1482+
it('should throw error if the "action" is an invalid type given', () => {
14991483
serverlessApigatewayServiceProxy.serverless.service.custom = {
15001484
apiGatewayServiceProxies: [
15011485
{
@@ -1514,7 +1498,7 @@ describe('#validateServiceProxies()', () => {
15141498
)
15151499
})
15161500

1517-
it('should throw error if hashKey is not a string or an object', () => {
1501+
it('should throw error if the "hashKey" is not a string or an object', () => {
15181502
serverlessApigatewayServiceProxy.serverless.service.custom = {
15191503
apiGatewayServiceProxies: [
15201504
{
@@ -1533,7 +1517,7 @@ describe('#validateServiceProxies()', () => {
15331517
)
15341518
})
15351519

1536-
it('should not throw error if hashKey is a string', () => {
1520+
it('should not throw error if the "hashKey" is a string', () => {
15371521
serverlessApigatewayServiceProxy.serverless.service.custom = {
15381522
apiGatewayServiceProxies: [
15391523
{
@@ -1550,7 +1534,7 @@ describe('#validateServiceProxies()', () => {
15501534
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
15511535
})
15521536

1553-
it('should not throw error if hashKey is a pathParam', () => {
1537+
it('should not throw error if the "hashKey" is a pathParam', () => {
15541538
serverlessApigatewayServiceProxy.serverless.service.custom = {
15551539
apiGatewayServiceProxies: [
15561540
{
@@ -1567,7 +1551,7 @@ describe('#validateServiceProxies()', () => {
15671551
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
15681552
})
15691553

1570-
it('should not throw error if hashKey is a queryStringParam', () => {
1554+
it('should not throw error if the "hashKey" is a queryStringParam', () => {
15711555
serverlessApigatewayServiceProxy.serverless.service.custom = {
15721556
apiGatewayServiceProxies: [
15731557
{
@@ -1584,7 +1568,7 @@ describe('#validateServiceProxies()', () => {
15841568
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
15851569
})
15861570

1587-
it('should throw error if hashKey is not an attributeType and is an object', () => {
1571+
it('should throw error if the "hashKey" is not an attributeType', () => {
15881572
serverlessApigatewayServiceProxy.serverless.service.custom = {
15891573
apiGatewayServiceProxies: [
15901574
{
@@ -1603,7 +1587,7 @@ describe('#validateServiceProxies()', () => {
16031587
)
16041588
})
16051589

1606-
it('should throw error if hashKey is a pathParam and a queryStringParam at the same time', () => {
1590+
it('should throw error if the "hashKey" is a pathParam and a queryStringParam at the same time', () => {
16071591
serverlessApigatewayServiceProxy.serverless.service.custom = {
16081592
apiGatewayServiceProxies: [
16091593
{
@@ -1622,7 +1606,7 @@ describe('#validateServiceProxies()', () => {
16221606
)
16231607
})
16241608

1625-
it('should throw error if rangeKey is not a string or an object', () => {
1609+
it('should throw error if the "rangeKey" is not a string or an object', () => {
16261610
serverlessApigatewayServiceProxy.serverless.service.custom = {
16271611
apiGatewayServiceProxies: [
16281612
{
@@ -1642,7 +1626,7 @@ describe('#validateServiceProxies()', () => {
16421626
)
16431627
})
16441628

1645-
it('should not throw error if rangeKey is a string', () => {
1629+
it('should not throw error if the "rangeKey" is a string', () => {
16461630
serverlessApigatewayServiceProxy.serverless.service.custom = {
16471631
apiGatewayServiceProxies: [
16481632
{
@@ -1660,7 +1644,7 @@ describe('#validateServiceProxies()', () => {
16601644
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
16611645
})
16621646

1663-
it('should not throw error if rangeKey is a pathParam', () => {
1647+
it('should not throw error if the "rangeKey" is a pathParam', () => {
16641648
serverlessApigatewayServiceProxy.serverless.service.custom = {
16651649
apiGatewayServiceProxies: [
16661650
{
@@ -1678,7 +1662,7 @@ describe('#validateServiceProxies()', () => {
16781662
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
16791663
})
16801664

1681-
it('should not throw error if rangeKey is a queryStringParam', () => {
1665+
it('should not throw error if the "rangeKey" is a queryStringParam', () => {
16821666
serverlessApigatewayServiceProxy.serverless.service.custom = {
16831667
apiGatewayServiceProxies: [
16841668
{
@@ -1696,7 +1680,7 @@ describe('#validateServiceProxies()', () => {
16961680
expect(() => serverlessApigatewayServiceProxy.validateServiceProxies()).to.not.throw()
16971681
})
16981682

1699-
it('should throw error if rangeKey is not an attributeType and is an object', () => {
1683+
it('should throw error if the "rangeKey" is not an attributeType', () => {
17001684
serverlessApigatewayServiceProxy.serverless.service.custom = {
17011685
apiGatewayServiceProxies: [
17021686
{
@@ -1716,7 +1700,7 @@ describe('#validateServiceProxies()', () => {
17161700
)
17171701
})
17181702

1719-
it('should throw error if rangeKey is a pathParam and a queryStringParam at the same time', () => {
1703+
it('should throw error if the "rangeKey" is a pathParam and a queryStringParam at the same time', () => {
17201704
serverlessApigatewayServiceProxy.serverless.service.custom = {
17211705
apiGatewayServiceProxies: [
17221706
{

0 commit comments

Comments
 (0)