This repository was archived by the owner on Sep 21, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-22
lines changed Expand file tree Collapse file tree 3 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,17 @@ console.log(gemini.config.rootUrl);
35
35
36
36
## Reading the tests
37
37
38
- ` gemini.readTests(paths, grep ) ` — read all of the tests from specified paths into
38
+ ` gemini.readTests(paths, options ) ` — read all of the tests from specified paths into
39
39
one suite collection.
40
40
41
41
* ` paths ` is an array of files or directories paths containing Gemini tests.
42
42
If not specified, will look for tests in ` $projectRoot/gemini ` directory.
43
43
44
- * ` grep ` is a regular expression to filter suites to read. By default, all tests
45
- will be read. If this option is set, only suites with name matching the
46
- pattern will be read.
44
+ Options:
45
+
46
+ * ` grep ` — regular expression to filter suites to read. By default, all tests
47
+ will be added to collection. If this option is set, only suites with name matching the
48
+ pattern will be added to collection.
47
49
48
50
Returns promise which resolves to a ` SuiteCollection ` object.
49
51
Original file line number Diff line number Diff line change @@ -88,17 +88,7 @@ module.exports = class Gemini extends PassthroughEmitter {
88
88
return this . _exec ( ( ) => this . _run ( StateProcessor . createTester ( this . config ) , paths , options ) ) ;
89
89
}
90
90
91
- readTests ( paths , options ) {
92
- if ( _ . isRegExp ( options ) ) {
93
- console . warn ( chalk . yellow (
94
- `Passing grep to readTests is deprecated. You should pass an object with options: {grep: ${ options } }.`
95
- ) ) ;
96
-
97
- options = { grep : options } ;
98
- } else {
99
- options = options || { } ;
100
- }
101
-
91
+ readTests ( paths , options = { } ) {
102
92
return this . _exec ( ( ) => this . _readTests ( paths , options ) ) ;
103
93
}
104
94
Original file line number Diff line number Diff line change @@ -340,13 +340,6 @@ describe('gemini', () => {
340
340
assert . include ( allSuites , matchingBranchLeaf ) ;
341
341
} ) ;
342
342
} ) ;
343
-
344
- it ( 'should warn if RegExp was passed instead of object' , ( ) => {
345
- return readTests_ ( null , new RegExp ( / s t r i n g / ) )
346
- . then ( ( ) => assert . calledWith ( console . warn , sinon . match (
347
- 'Passing grep to readTests is deprecated. You should pass an object with options: {grep: /string/}.'
348
- ) ) ) ;
349
- } ) ;
350
343
} ) ;
351
344
352
345
describe ( 'test' , ( ) => {
You can’t perform that action at this time.
0 commit comments