# force lightning lwc test run

## Description for force lightning lwc test run

invokes Lightning Web Components Jest unit tests.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description                                                                                                                                                                                                               |
| ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--debug`        | `-d`              | **Type:** Boolean<br><br>run tests in debug mode                                                                                                                                                                          |
| `--json`         | N/A               | **Type:** Boolean<br><br>format output as json                                                                                                                                                                            |
| `--loglevel`     | N/A               | **Type:** Value<br>**Valid Values:** `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`<br>**Default value:** `warn`<br><br>logging level for this command invocation |
| `--watch`        | N/A               | **Type:** Boolean<br><br>run tests in watch mode                                                                                                                                                                          |

## Examples for force lightning lwc test run

```shell
sfdx force:lightning:lwc:test:run
```

```shell
sfdx force:lightning:lwc:test:run -w
```
