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: docs/profiles.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The short tag is `-p`
14
14
cucumber-js -p my_profile
15
15
```
16
16
17
-
## Simple Example
17
+
## Simple example
18
18
19
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:
20
20
@@ -67,6 +67,31 @@ Now, if we just run `cucumber-js` with no arguments, it will pick up our profile
67
67
cucumber-js -p ci
68
68
```
69
69
70
+
## ESM example
71
+
72
+
When using ES modules, you should use a default export for your default profile and named exports for additional profiles:
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:
0 commit comments