sfdx force:lightning:lwc:test:create

Creates a Lightning web component test file with boilerplate code inside a __tests__ directory

Options

NameDescription
--jsonFormat output as json
--loglevel <loglevel>Logging level for this command invocation
-f, --filepath <filepath>Path to Lightning web component .js file to create a test for