Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>LWC Test CreatorNew to Visual Studio Code? Get it now.
LWC Test Creator

LWC Test Creator

Max Goldfarb

|
977 installs
| (0) | Free
Quickly create boilerplate Jest tests for Salesforce Lightning Web Components (LWC)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LWC Test Creator

LWC Test Creator is an open-source VS Code extension built with JavaScript and the VS Code Extension API enabling users to quickly create boilerplate tests for Salesforce Lightning Web Components.

This extension creates a Lightning Web Component test template in the appropriate directory and only requires the user to enter the name of the Lightning Web Component as opposed to the path of the Lightning Web Component *.JS file or making the user change to the appropriate target directory while using the force:lightning:lwc:test:create CLI command.

  • Installation: https://marketplace.visualstudio.com/items?itemName=MaxGoldfarb.lwc-test-creator
  • GitHub: https://github.com/gfarb/lwc-test-creator

Demo

Features

  • Create Jest Test
    • Creates a __tests__ directory in the appropriate directory for the target Lightning Web Component.
    • Creates a <Lightning Web Component Name>.test.js file with boilerplate code in the __tests__ directory.
    • How to use (after installation):
      1. Open VS Code Command Palette
      2. Search for & select the Create Jest Test LWC Test Creator command
      3. Type in the name of the target Lightning Web Component & press 'Enter'

Requirements

  • VS Code ^v1.56
  • text-encoding-polyfill

Known Issues

  • Overwrites content in an existing test file for the target Lightning Web Component if the test file is named <Lightning Web Component Name>.test.js.

Release Notes

1.0.0

Initial release of LWC Test Creator

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft