Skip to content

Commit e4929f0

Browse files
committed
Add section of config caveats
This has been a recurring issue lately.
1 parent 3d3f499 commit e4929f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/configuration.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ The preprocessor uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig
2525
}
2626
```
2727

28+
## Caveats / Debugging
29+
30+
Notice that configuration, when `package.json` is used, **must** be placed within the `"cypress-cucumber-preprocessor": { .. }` block. This does not apply if EG. `.cypress-cucumber-preprocessorrc.json` is used, as this is a file solely dedicated to preprocessor configuration, while `package.json` is not.
31+
32+
If you place configuration values in multiple locations, *only one* of them will apply and take affect. The implication of this is that if you have an empty `"cypress-cucumber-preprocessor": { .. }` block within your `package.json` and try to write another configuration file, then you will be surprised to find that nothing seems to work.
33+
34+
If you're unsure of what configuration values is actually being applied, then you can run Cypress with the following to enable debug output which will tell you.
35+
36+
```
37+
$ DEBUG=cypress:electron,cypress-configuration,cypress-cucumber-preprocessor cypress run
38+
```
39+
2840
## Configuration overrides
2941

3042
Configuration options can be overriden using (Cypress-) [environment variable](https://docs.cypress.io/guides/guides/environment-variables). The `filterSpecs` options (described in [docs/tags.md](tags.md)) can for instance be overriden by running Cypress like shown below.

0 commit comments

Comments
 (0)