Skip to content

Commit

Permalink
chore: prettify JS code missed in aws#1185 (aws#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Jul 16, 2020
1 parent ea25257 commit 825538a
Show file tree
Hide file tree
Showing 151 changed files with 829 additions and 1,352 deletions.
35 changes: 16 additions & 19 deletions clients/client-cognito-identity/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ module.exports = function (config) {
frameworks: ["mocha", "chai"],
files: ["e2e/**/*.ispec.ts"],
preprocessors: {
"e2e/**/*.ispec.ts": ["webpack", "sourcemap", "credentials", "env"]
"e2e/**/*.ispec.ts": ["webpack", "sourcemap", "credentials", "env"],
},
webpackMiddleware: {
stats: "minimal"
stats: "minimal",
},
webpack: {
resolve: {
extensions: [".ts", ".js"]
extensions: [".ts", ".js"],
},
mode: "development",
module: {
Expand All @@ -24,21 +24,18 @@ module.exports = function (config) {
options: {
configFile: "tsconfig.json",
compilerOptions: {
rootDir: "./"
}
}
}
rootDir: "./",
},
},
},
],
exclude: /node_modules/
}
]
exclude: /node_modules/,
},
],
},
devtool: "inline-source-map"
devtool: "inline-source-map",
},
envPreprocessor: [
"AWS_SMOKE_TEST_REGION",
"AWS_SMOKE_TEST_IDENTITY_POOL_ID"
],
envPreprocessor: ["AWS_SMOKE_TEST_REGION", "AWS_SMOKE_TEST_IDENTITY_POOL_ID"],
plugins: [
"@aws-sdk/karma-credential-loader",
"karma-chrome-launcher",
Expand All @@ -48,7 +45,7 @@ module.exports = function (config) {
"karma-webpack",
"karma-coverage",
"karma-sourcemap-loader",
"karma-env-preprocessor"
"karma-env-preprocessor",
],
reporters: ["progress"],
port: 9876,
Expand All @@ -59,11 +56,11 @@ module.exports = function (config) {
customLaunchers: {
FirefoxHeadless: {
base: "Firefox",
flags: ["-headless"]
}
flags: ["-headless"],
},
},
singleRun: true,
concurrency: Infinity,
exclude: ["**/*.d.ts", "*.spec.ts"]
exclude: ["**/*.d.ts", "*.spec.ts"],
});
};
30 changes: 15 additions & 15 deletions clients/client-s3/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ module.exports = function (config) {
frameworks: ["mocha", "chai"],
files: ["e2e/**/*.ispec.ts"],
preprocessors: {
"e2e/**/*.ispec.ts": ["webpack", "sourcemap", "credentials", "env"]
"e2e/**/*.ispec.ts": ["webpack", "sourcemap", "credentials", "env"],
},
webpackMiddleware: {
stats: "minimal"
stats: "minimal",
},
webpack: {
resolve: {
extensions: [".ts", ".js"]
extensions: [".ts", ".js"],
},
mode: "development",
module: {
Expand All @@ -24,16 +24,16 @@ module.exports = function (config) {
options: {
configFile: "tsconfig.json",
compilerOptions: {
rootDir: "./"
}
}
}
rootDir: "./",
},
},
},
],
exclude: /node_modules/
}
]
exclude: /node_modules/,
},
],
},
devtool: "inline-source-map"
devtool: "inline-source-map",
},
envPreprocessor: ["AWS_SMOKE_TEST_REGION", "AWS_SMOKE_TEST_BUCKET"],
plugins: [
Expand All @@ -45,7 +45,7 @@ module.exports = function (config) {
"karma-webpack",
"karma-coverage",
"karma-sourcemap-loader",
"karma-env-preprocessor"
"karma-env-preprocessor",
],
reporters: ["progress"],
port: 9876,
Expand All @@ -56,11 +56,11 @@ module.exports = function (config) {
customLaunchers: {
FirefoxHeadless: {
base: "Firefox",
flags: ["-headless"]
}
flags: ["-headless"],
},
},
singleRun: true,
concurrency: Infinity,
exclude: ["**/*.d.ts", "*.spec.ts"]
exclude: ["**/*.d.ts", "*.spec.ts"],
});
};
4 changes: 2 additions & 2 deletions clients/client-transcribe-streaming/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ module.exports = {
"/node_modules/",
"/commands/",
"/protocols/", // protocols tested in protocol protocol_tests folder
"endpoints" // endpoint tested in tests/functional/endpoints
]
"endpoints", // endpoint tested in tests/functional/endpoints
],
};
2 changes: 1 addition & 1 deletion clients/client-transcribe-streaming/jest.integ.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ const base = require("../../jest.config.base.js");

module.exports = {
...base,
testMatch: ["**/*.integ.spec.js"]
testMatch: ["**/*.integ.spec.js"],
};
4 changes: 2 additions & 2 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [2, "always", ["feat", "fix", "docs", "test", "chore"]]
}
"type-enum": [2, "always", ["feat", "fix", "docs", "test", "chore"]],
},
};
16 changes: 4 additions & 12 deletions features/autoscaling/step_definitions/autoscaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ Before({ tags: "@autoscaling" }, function (scenario, callback) {
callback();
});

Given("I create a launch configuration with name {string}", function (
name,
callback
) {
Given("I create a launch configuration with name {string}", function (name, callback) {
const params = {
ImageId: "ami-1624987f",
InstanceType: "m1.small",
LaunchConfigurationName: name
LaunchConfigurationName: name,
};
this.request(null, "createLaunchConfiguration", params, callback, false);
});
Expand All @@ -22,13 +19,8 @@ Given("I describe launch configurations", function (callback) {
this.request(null, "describeLaunchConfigurations", {}, callback);
});

Then("the list should contain the launch configuration {string}", function (
name,
callback
) {
this.assert.contains(this.data.LaunchConfigurations, function (
configuration
) {
Then("the list should contain the launch configuration {string}", function (name, callback) {
this.assert.contains(this.data.LaunchConfigurations, function (configuration) {
return configuration.LaunchConfigurationName === name;
});
callback();
Expand Down
7 changes: 2 additions & 5 deletions features/cloudformation/step_definitions/cloudformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ Before({ tags: "@cloudformation" }, function (scenario, callback) {
callback();
});

Given("I create a CloudFormation stack with name prefix {string}", function (
prefix,
callback
) {
Given("I create a CloudFormation stack with name prefix {string}", function (prefix, callback) {
this.stackName = this.uniqueName(prefix);
this.templateBody = '{"Resources":{"member":{"Type":"AWS::SQS::Queue"}}}';
const params = {
TemplateBody: this.templateBody,
StackName: this.stackName,
EnableTerminationProtection: true
EnableTerminationProtection: true,
};
this.request(null, "createStack", params, callback, false);
});
40 changes: 15 additions & 25 deletions features/cloudfront/step_definitions/cloudfront.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { Before, Given } = require("cucumber");
const createParams = {
CallerReference: "",
Aliases: {
Quantity: 0
Quantity: 0,
},
DefaultRootObject: "",
Origins: {
Expand All @@ -15,41 +15,41 @@ const createParams = {
CustomOriginConfig: {
HTTPPort: 80,
HTTPSPort: 443,
OriginProtocolPolicy: "match-viewer"
}
}
OriginProtocolPolicy: "match-viewer",
},
},
],
Quantity: 1
Quantity: 1,
},
DefaultCacheBehavior: {
TargetOriginId: "origin",
ForwardedValues: {
QueryString: false,
Cookies: {
Forward: "all"
}
Forward: "all",
},
},
TrustedSigners: {
Items: [],
Enabled: false,
Quantity: 0
Quantity: 0,
},
ViewerProtocolPolicy: "allow-all",
MinTTL: 0
MinTTL: 0,
},
CacheBehaviors: {
Items: [],
Quantity: 0
Quantity: 0,
},
Comment: "",
Logging: {
Enabled: false,
Bucket: "invalidbucket.s3.amazonaws.com",
Prefix: "prefix",
IncludeCookies: false
IncludeCookies: false,
},
PriceClass: "PriceClass_All",
Enabled: false
Enabled: false,
};

Before({ tags: "@cloudfront" }, function (scenario, callback) {
Expand All @@ -58,21 +58,11 @@ Before({ tags: "@cloudfront" }, function (scenario, callback) {
callback();
});

Given("I create a CloudFront distribution with name prefix {string}", function (
prefix,
callback
) {
Given("I create a CloudFront distribution with name prefix {string}", function (prefix, callback) {
this.cfName = this.uniqueName(prefix);
this.cfCreateParams.CallerReference = this.cfName;
this.cfCreateParams.Origins.Items[0].Id =
this.cfName === "" ? "origin" : "InvalidOrigin";
this.request(
null,
"createDistribution",
{ DistributionConfig: this.cfCreateParams },
callback,
false
);
this.cfCreateParams.Origins.Items[0].Id = this.cfName === "" ? "origin" : "InvalidOrigin";
this.request(null, "createDistribution", { DistributionConfig: this.cfCreateParams }, callback, false);
});

Given("I list CloudFront distributions", function (callback) {
Expand Down
13 changes: 2 additions & 11 deletions features/cloudsearch/step_definitions/cloudsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ Before({ tags: "@cloudsearch" }, function (scenario, callback) {
callback();
});

Given("I create a domain with name prefix {string}", function (
prefix,
callback
) {
Given("I create a domain with name prefix {string}", function (prefix, callback) {
this.domainName = this.uniqueName(prefix);
this.request(
null,
"createDomain",
{ DomainName: this.domainName },
callback,
false
);
this.request(null, "createDomain", { DomainName: this.domainName }, callback, false);
});
8 changes: 1 addition & 7 deletions features/cloudtrail/step_definitions/cloudtrail.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,5 @@ Given("I describe trails", function (callback) {
});

Given("I create a trail with an invalid name", function (callback) {
this.request(
null,
"createTrail",
{ Name: "", S3BucketName: "" },
callback,
false
);
this.request(null, "createTrail", { Name: "", S3BucketName: "" }, callback, false);
});
Loading

0 comments on commit 825538a

Please sign in to comment.