Salesforce CLI Command Reference
Release Notes
Deprecation Policy
force data bulk delete
force data bulk status
force data bulk upsert
force lightning lwc test create
force lightning lwc test run
force lightning lwc test setup
creates a Lightning web component test file with boilerplate code inside a tests directory.
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑filepath | ‑f | Type: Value Required path to Lightning web component .js file to create a test for |
‑‑json | N/A | Type: Boolean format output as json |
‑‑loglevel | N/A | Type: Value Valid Values: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATALDefault value: warnlogging level for this command invocation |
1sfdx force:lightning:lwc:test:create -f force-app/main/default/lwc/myButton/myButton.js