You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,13 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO
5
5
#### BREAKING CHANGES
6
6
7
7
* cucumber now waits for the event loop to drain before exiting. To exit immediately when the tests finish running use `--exit`. Use of this flag is discouraged. See [here](/docs/cli.md#exiting) for more information
8
+
* remove `--compiler` option. See [here](/docs/cli.md#transpilers) for the new way to use transpilers
9
+
10
+
#### New Features
11
+
12
+
* can now use glob patterns for selecting what features to run
13
+
* update `--require` to support glob patterns
14
+
* add `--require-module` to require node modules before support code is loaded
Copy file name to clipboardExpand all lines: docs/cli.md
+8-5
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,10 @@ needs to be required in your support files and globally installed modules cannot
17
17
18
18
## Running specific features
19
19
20
+
* Specify a [glob](https://github.com/isaacs/node-glob) pattern
21
+
*`$ cucumber.js features/**/*.feature`
22
+
* Specify a feature directory
23
+
*`$ cucumber.js features/dir`
20
24
* Specify a feature file
21
25
*`$ cucumber.js features/my_feature.feature`
22
26
* Specify a scenario by its line number
@@ -28,14 +32,13 @@ needs to be required in your support files and globally installed modules cannot
28
32
29
33
## Requiring support files
30
34
31
-
Use `--require <FILE|DIR>` to require files before executing the features.
35
+
Use `--require <GLOB|DIR|FILE>` to require support files before executing the features. Uses [glob](https://github.com/isaacs/node-glob) patterns.
32
36
If not used, the following files are required:
33
37
* If the features live in a `features` directory (at any level)
34
-
*all support files in the `features` directory
38
+
*`features/**/*.js`
35
39
* Otherwise
36
-
*all support files in the directories of the features
40
+
*`<DIR>/**/*.js` for each directory containing the selected features
37
41
38
-
Support files are defined as all `*.js` files and other extensions specified by `--compiler`.
39
42
Automatic loading is disabled when this option is specified, and all loading becomes explicit.
40
43
41
44
## Formats
@@ -110,7 +113,7 @@ Use `--tags <EXPRESSION>` to run specific features or scenarios. This option is
110
113
111
114
## Transpilers
112
115
113
-
Step definitions and support files can be written in other languages that transpile to javascript. To do this use the CLI option `--compiler <file_extension>:<module_name>`. Running`require("<module_name>")`, should make it possible to require files with the given extension. As an example, load [CoffeeScript](https://www.npmjs.com/package/coffee-script) support files with `--compiler coffee:coffee-script/register`.
116
+
Step definitions and support files can be written in other languages that transpile to javascript. To do this use the CLI option `--require-module <module_name>`, where`require("<module_name>")` should make it possible to require files for your language. Also use `--require features/**/*.<ext>` if your files end in an extension other than `js`. As an example, load [CoffeeScript](https://www.npmjs.com/package/coffee-script) support files with `--require-module coffee-script/register --require features/**/*.coffee`.
0 commit comments