This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -151,8 +151,8 @@ ConfigParser.getSpecs = function(config) {
151
151
return config . specs ;
152
152
}
153
153
154
- Array . prototype . forEach . call ( config . suites , function ( suite ) {
155
- union ( specs , makeArray ( suite ) ) ;
154
+ Object . keys ( config . suites || { } ) . sort ( ) . forEach ( function ( suite ) {
155
+ union ( specs , makeArray ( config . suites [ suite ] ) ) ;
156
156
} ) ;
157
157
return specs ;
158
158
} ;
Original file line number Diff line number Diff line change @@ -39,6 +39,22 @@ describe('the config parser', function() {
39
39
expect ( config . onPrepare ) . toEqual ( path . normalize ( process . cwd ( ) + '/baz/qux.js' ) ) ;
40
40
} ) ;
41
41
42
+ describe ( 'getSpecs()' , function ( ) {
43
+ it ( 'should return all the specs from "config.suites" if no other sources are provided' , function ( ) {
44
+ var config = {
45
+ specs : [ ] ,
46
+ suites : {
47
+ foo : 'foo.spec.js' ,
48
+ bar : 'bar.spec.js'
49
+ }
50
+ } ;
51
+
52
+ var specs = new ConfigParser . getSpecs ( config ) ;
53
+
54
+ expect ( specs ) . toEqual ( [ 'bar.spec.js' , 'foo.spec.js' ] ) ;
55
+ } ) ;
56
+ } ) ;
57
+
42
58
describe ( 'resolving globs' , function ( ) {
43
59
it ( 'should resolve relative to the cwd' , function ( ) {
44
60
spyOn ( process , 'cwd' ) . and . returnValue ( __dirname + '/' ) ;
You can’t perform that action at this time.
0 commit comments