/lwc-jest-example

A simple LWC with a jest unit test for testing CI/CD Pipeline configuration.

Primary LanguageJavaScript

LWC Components

This project contains a Lightning Web Component (LWC) with a Jest unit test. This project is used to showcase the power of a CI/CD pipeline. Feel free to use and extend!

Init NodeJs packages

My preference is to use yarn as the nodejs package manager.

  1. Run the following command on the command line:> yarn add ./package.json That's it.

If you prefer an alternate method let Visual Studio do the work for you!!

Configure Your Salesforce DX Project

The sfdx-project.json file contains useful configuration information for your project. See Salesforce DX Project Configuration in the Salesforce DX Developer Guide for details about this file.

VSCode Extensions

Here's the list of my favorite Salesforce DX plugins.

The directory .vscode, extensions.json defines the extensions.

{
  "recommendations": [
    "salesforce.salesforcedx-vscode",
    "redhat.vscode-xml",
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "financialforce.lana"
  ]
}

Feel free to replace the optional extensions.

  • redhat.vscode-xml
  • dbaeumer.vscode-eslint
  • esbenp.prettier-vscode
  • financialforce.lana

Read All About It