@@ -138,7 +138,7 @@ export default class App {
138
138
suites : testSuites ,
139
139
} ;
140
140
const junitXml = getJunitXml ( testSuiteReport ) ;
141
- fs . writeFileSync ( junitFile , junitXml ) ;
141
+ fs . writeFileSync ( './' + junitFile , junitXml ) ;
142
142
143
143
log ( green ( `Test results written to ${ junitFile } ` ) ) ;
144
144
}
@@ -201,6 +201,14 @@ export default class App {
201
201
for ( const child of testCases ) {
202
202
const filePath = path . join ( testCaseDir , child ) ;
203
203
204
+ // Skip dynamic typing files if not supported
205
+ if ( ! sdkRelay . getSDKDetails ( ) . supportsDynamicTyping && isDynamicTypingFile ( filePath ) ) {
206
+ logIndent ( 1 , yellow ( 'skipped' ) + ` ${ child } SDK does not support dynamic typing` ) ;
207
+ const testCaseResult : TestCase = { name : child , classname : child , skipped : true } ;
208
+ testCaseResults . push ( testCaseResult ) ;
209
+ continue ;
210
+ }
211
+
204
212
// Skip directories.
205
213
if ( ! fs . statSync ( filePath ) . isFile ( ) ) {
206
214
continue ;
@@ -218,6 +226,14 @@ export default class App {
218
226
// Flag testing!!
219
227
const isFlagTest = testCaseObj [ 'variationType' ] ;
220
228
229
+ // Skip bandit tests if not supported
230
+ if ( ! isFlagTest && ! sdkRelay . getSDKDetails ( ) . supportsBandits ) {
231
+ logIndent ( 1 , yellow ( 'skipped' ) + ' SDK does not support Bandits' ) ;
232
+ const testCaseResult : TestCase = { name : child , classname : child , skipped : true } ;
233
+ testCaseResults . push ( testCaseResult ) ;
234
+ continue ;
235
+ }
236
+
221
237
if ( testCaseObj [ 'subjects' ] . length === 0 ) {
222
238
testCaseResults . push ( { name : testCase , errors : [ { message : 'No test subjects found' } ] } ) ;
223
239
}
@@ -277,7 +293,7 @@ export default class App {
277
293
. catch ( ( error ) => {
278
294
if ( error instanceof FeatureNotSupportedError ) {
279
295
// Skip this test
280
- logIndent ( 1 , yellow ( 'skipped' ) + ` ${ testCaseLabel } : SDK does not support this feature ` ) ;
296
+ logIndent ( 1 , yellow ( 'skipped' ) + ` ${ testCaseLabel } : SDK does not support ${ error . featureName } ` ) ;
281
297
testCaseResult . skipped = true ;
282
298
} else {
283
299
log ( red ( 'Error1:' ) , error ) ;
@@ -299,3 +315,6 @@ export default class App {
299
315
return isEqual ( subject [ 'assignment' ] , results [ 'result' ] ) ;
300
316
}
301
317
}
318
+ function isDynamicTypingFile ( filePath : string ) {
319
+ return filePath . indexOf ( 'dynamic-typing' ) >= 0 ;
320
+ }
0 commit comments