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
+5-2
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,11 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber
9
9
10
10
## [Unreleased]
11
11
### Added
12
-
- Add error message for pending steps ([#2392](https://github.com/cucumber/cucumber-js/pull/2393))
13
-
- Updated profiles to allow defining a default function profile to be used as profile builder ([#2384](https://github.com/cucumber/cucumber-js/pull/2384))
12
+
- Allow supplying error details for pending steps ([#2393](https://github.com/cucumber/cucumber-js/pull/2393))
13
+
- Allow defining a default function profile to be used as profile builder ([#2384](https://github.com/cucumber/cucumber-js/pull/2384))
14
+
15
+
### Fixed
16
+
- Various typing improvements and other fixes ([#2390](https://github.com/cucumber/cucumber-js/pull/2390), [#2391](https://github.com/cucumber/cucumber-js/pull/2391), [#2394](https://github.com/cucumber/cucumber-js/pull/2394))
Copy file name to clipboardExpand all lines: docs/profiles.md
+4-37
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,7 @@ The short tag is `-p`
14
14
cucumber-js -p my_profile
15
15
```
16
16
17
-
## Default profiles
18
-
If defined, a `default` profile is used in case no profiles are specified at runtime. A default profile is either a profile or a function that returns either a profiles object or a `Promise` of profiles object. If defined this way, no other profile shall be defined.
19
-
20
-
## Examples
21
-
22
-
### Simple Example
17
+
## Simple Example
23
18
24
19
Let's take the common case of having some things a bit different locally than on a continuous integration server. Here's the configuration we've been running locally:
25
20
@@ -72,38 +67,12 @@ Now, if we just run `cucumber-js` with no arguments, it will pick up our profile
If you need to define your profiles dynamically (including asynchronously), you can use the `default` profile key/export to provide an async function that resolves to your profiles. This can be particularly useful in an ESM context where the profiles are static exports. Here's an example:
104
73
105
74
```javascript
106
-
exportdefaultfunctionbuildProfiles() {
75
+
exportdefaultfunction() {
107
76
constcommon= {
108
77
requireModule: ['ts-node/register'],
109
78
require: ['support/**/*.ts'],
@@ -126,8 +95,6 @@ export default function buildProfiles() {
126
95
}
127
96
```
128
97
129
-
This way the `buildProfiles` function will be invoked to discover profiles.
130
-
131
98
## Using Profiles for Arguments
132
99
133
100
Cucumber doesn't allow custom command line arguments. For example:
0 commit comments