Skip to content

Commit 20f5142

Browse files
committed
Use less stupid code to perform suites overrides. Thanks @Blasz
Refs #269. (cherry picked from commit 0a14d68)
1 parent c8856f7 commit 20f5142

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

lib/realClient.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ define([
1616
/*jshint maxcomplexity:14 */
1717
main.config = config;
1818

19-
if (args.suites === '') {
20-
args.suites = [];
21-
}
22-
else if (args.suites === undefined) {
19+
if (args.suites === undefined) {
2320
args.suites = config.suites;
2421
}
2522

runner.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,14 @@ else {
108108
}
109109
}
110110

111-
if (args.functionalSuites === '') {
112-
args.functionalSuites = [];
113-
}
114-
else if (args.functionalSuites === undefined) {
111+
if (args.functionalSuites === undefined) {
115112
args.functionalSuites = config.functionalSuites;
116113
}
117114

115+
if (args.suites === undefined) {
116+
args.suites = config.suites;
117+
}
118+
118119
if (config.tunnel.indexOf('/') === -1) {
119120
config.tunnel = 'dojo/node!digdug/' + config.tunnel;
120121
}
@@ -258,7 +259,7 @@ else {
258259
// Node.js side but could be a populated array when it gets to the browser side (conditional based
259260
// on environment), so we require users to explicitly set it to a falsy value to assure the test
260261
// system that it should not run the client
261-
if (args.suites !== undefined ? args.suites !== '' : config.suites) {
262+
if (args.suites) {
262263
suite.tests.push(new ClientSuite({ parent: suite, config: config }));
263264
}
264265

0 commit comments

Comments
 (0)