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);
3535
3636## Reading the tests
3737
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
3939one suite collection.
4040
4141* ` paths ` is an array of files or directories paths containing Gemini tests.
4242 If not specified, will look for tests in ` $projectRoot/gemini ` directory.
4343
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.
4749
4850Returns promise which resolves to a ` SuiteCollection ` object.
4951
Original file line number Diff line number Diff line change @@ -88,17 +88,7 @@ module.exports = class Gemini extends PassthroughEmitter {
8888 return this . _exec ( ( ) => this . _run ( StateProcessor . createTester ( this . config ) , paths , options ) ) ;
8989 }
9090
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 = { } ) {
10292 return this . _exec ( ( ) => this . _readTests ( paths , options ) ) ;
10393 }
10494
Original file line number Diff line number Diff line change @@ -340,13 +340,6 @@ describe('gemini', () => {
340340 assert . include ( allSuites , matchingBranchLeaf ) ;
341341 } ) ;
342342 } ) ;
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- } ) ;
350343 } ) ;
351344
352345 describe ( 'test' , ( ) => {
You can’t perform that action at this time.
0 commit comments