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: README.md
+21-2Lines changed: 21 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -58,11 +58,14 @@ Options:
58
58
--debug Run tests in debug mode
59
59
(https://jestjs.io/docs/en/troubleshooting)
60
60
[boolean] [default: false]
61
+
--projectJson Path to the project JSON file (defaults to
62
+
sfdx-project.json) [string]
61
63
--help Show help [boolean]
62
64
63
65
Examples:
64
-
sfdx-lwc-jest --coverage Collect coverage and display in output
65
-
sfdx-lwc-jest -- --json All params after `--` are directly passed to Jest
66
+
sfdx-lwc-jest --coverage Collect coverage and display in output
67
+
sfdx-lwc-jest --projectJson my.json Use custom project file
68
+
sfdx-lwc-jest -- --json All params after `--` are directly passed to Jest
66
69
```
67
70
68
71
## Passing Additional Jest CLI Options
@@ -75,6 +78,22 @@ sfdx-lwc-jest -- --json
75
78
76
79
See the [Jest documentation](http://facebook.github.io/jest/docs/en/cli.html) for all CLI options.
77
80
81
+
## Custom Project Configuration
82
+
83
+
By default, `sfdx-lwc-jest` looks for `sfdx-project.json` in the current working directory to discover LWC component paths. You can specify a custom project JSON file using the `--projectJson` option:
0 commit comments