@@ -112,53 +112,53 @@ export class SmokeTestGenerator {
112
112
private generateKarmaConfiguration ( ) {
113
113
return `
114
114
// Karma configuration
115
- process.env.CHROME_BIN = require(' puppeteer' ).executablePath();
115
+ process.env.CHROME_BIN = require(" puppeteer" ).executablePath();
116
116
117
117
module.exports = function(config) {
118
- config.set({
119
- basePath: '' ,
120
- frameworks: [' jasmine', ' karma-typescript' ],
121
- files: [
122
- ' test/smoke/*.spec.ts' ,
123
- ' commands/*.ts' ,
124
- ' model/*.ts' ,
125
- ' types/*.ts' ,
126
- ' *.ts'
127
- ],
128
- preprocessors: {
129
- ' test/smoke/index.spec.ts': ' credentials' ,
130
- ' **/*.ts': ' karma-typescript'
131
- },
132
- plugins: [
133
- ' @aws-sdk/karma-credential-loader' ,
134
- ' karma-chrome-launcher' ,
135
- ' karma-coverage' ,
136
- ' karma-jasmine' ,
137
- ' karma-typescript'
138
- ],
139
- reporters: [' progress', ' karma-typescript' ],
140
- karmaTypescriptConfig: {
141
- tsconfig: ' ./tsconfig.json' ,
142
- bundlerOptions: {
143
- addNodeGlobals: false
144
- }
145
- },
146
- port: 9876,
147
- colors: false,
148
- logLevel: config.LOG_INFO,
149
- autoWatch: false,
150
- browsers: [' ChromeHeadlessDisableCors' ],
151
- customLaunchers: {
152
- ChromeHeadlessDisableCors: {
153
- base: ' ChromeHeadless' ,
154
- flags: [' --disable-web-security' ]
155
- }
156
- },
157
- singleRun: true,
158
- concurrency: Infinity,
159
- exclude: [' **/*.d.ts' ]
160
- });
161
- };
118
+ config.set({
119
+ basePath: "" ,
120
+ frameworks: [" jasmine", " karma-typescript" ],
121
+ files: [
122
+ " test/smoke/*.spec.ts" ,
123
+ " commands/*.ts" ,
124
+ " model/*.ts" ,
125
+ " types/*.ts" ,
126
+ " *.ts"
127
+ ],
128
+ preprocessors: {
129
+ " test/smoke/index.spec.ts": " credentials" ,
130
+ " **/*.ts": " karma-typescript"
131
+ },
132
+ plugins: [
133
+ " @aws-sdk/karma-credential-loader" ,
134
+ " karma-chrome-launcher" ,
135
+ " karma-coverage" ,
136
+ " karma-jasmine" ,
137
+ " karma-typescript"
138
+ ],
139
+ reporters: [" progress", " karma-typescript" ],
140
+ karmaTypescriptConfig: {
141
+ tsconfig: " ./tsconfig.json" ,
142
+ bundlerOptions: {
143
+ addNodeGlobals: false
144
+ }
145
+ },
146
+ port: 9876,
147
+ colors: false,
148
+ logLevel: config.LOG_INFO,
149
+ autoWatch: false,
150
+ browsers: [" ChromeHeadlessDisableCors" ],
151
+ customLaunchers: {
152
+ ChromeHeadlessDisableCors: {
153
+ base: " ChromeHeadless" ,
154
+ flags: [" --disable-web-security" ]
155
+ }
156
+ },
157
+ singleRun: true,
158
+ concurrency: Infinity,
159
+ exclude: [" **/*.d.ts" ]
160
+ });
161
+ };
162
162
` . trim ( ) ;
163
163
}
164
164
@@ -173,21 +173,21 @@ module.exports = function(config) {
173
173
174
174
for ( const commandName of commandNames ) {
175
175
commandImports . push (
176
- `import {${ commandName } } from ' ../../commands/${ commandName } ' ;`
176
+ `import {${ commandName } } from " ../../commands/${ commandName } " ;`
177
177
) ;
178
178
}
179
179
180
180
return `
181
- import {${ this . clientName } } from ' ../../${ this . clientName } ' ;
181
+ import {${ this . clientName } } from " ../../${ this . clientName } " ;
182
182
${ commandImports . join ( "\n" ) }
183
183
184
184
async function smokeTestRunner() {
185
- const defaultRegion = process.env.AWS_SMOKE_TEST_REGION || ' ${
185
+ const defaultRegion = process.env.AWS_SMOKE_TEST_REGION || " ${
186
186
this . model . defaultRegion
187
- } ' ;
187
+ } " ;
188
188
let testFailed = false;
189
- console.log(' 1..${ smokeTests . length } ' );
190
- console.log(' # Running tests for ${ this . serviceId } .' );
189
+ console.log(" 1..${ smokeTests . length } " );
190
+ console.log(" # Running tests for ${ this . serviceId } ." );
191
191
192
192
${ smokeTests . map ( test => new IndentedSection ( test , 1 ) ) . join ( "\n" ) }
193
193
@@ -215,7 +215,7 @@ smokeTestRunner();
215
215
216
216
for ( const commandName of commandNames ) {
217
217
commandImports . push (
218
- `import {${ commandName } } from ' ../../commands/${ commandName } ' ;`
218
+ `import {${ commandName } } from " ../../commands/${ commandName } " ;`
219
219
) ;
220
220
}
221
221
@@ -226,11 +226,11 @@ smokeTestRunner();
226
226
] ;
227
227
228
228
return `
229
- import {${ this . clientName } } from ' ../../${ this . clientName } ' ;
229
+ import {${ this . clientName } } from " ../../${ this . clientName } " ;
230
230
${ commandImports . join ( "\n" ) }
231
231
${ injectedDeclarations . join ( "\n" ) }
232
- describe(' ${ this . packageName } Smoke Tests:' , () => {
233
- defaultRegion = defaultRegion || ' ${ defaultRegion } ' ;
232
+ describe(" ${ this . packageName } Smoke Tests:" , () => {
233
+ defaultRegion = defaultRegion || " ${ defaultRegion } " ;
234
234
${ smokeTests . map ( test => new IndentedSection ( test , 1 ) ) . join ( "\n" ) }
235
235
});
236
236
` . trim ( ) ;
0 commit comments