sfdx-lwc-jest
ecars
Our great sponsors
sfdx-lwc-jest | ecars | |
---|---|---|
2 | 5 | |
157 | 175 | |
0.6% | 2.3% | |
7.5 | 7.8 | |
6 days ago | 25 days ago | |
JavaScript | JavaScript | |
MIT License | Creative Commons Zero v1.0 Universal |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sfdx-lwc-jest
-
Apex Unit Testing on Salesforce
For those who are familiar with testing in Javascript but not in APEX or vice-versa, here are some key things to note. The Apex language comes with system methods for writing apex unit tests classes. For JavaScript, there are a number of different testing frameworks but Salesforce recommends using Jest for Lightning Web Components and LWC OSS because of its popularity, ease-of-use, and open-source framework. Jest for Lightning Web Components is available at the sfdx-lwc-jest Github repo. The following table draws some comparisons between the frameworks.
- Javascript Unit Testing
ecars
-
Apex Unit Testing on Salesforce
For the eCars app that we’re building, the activity will be to write an APEX test class for the PdfCreateService that we used in the prior session to call a Heroku microservice for generating PDF documents. The eCars code can be found at the linked Github repo and I have also included a link to the specific PdfCreateService class. If you have not gone through the exercise of pulling the code into a Salesforce Developer org or a scratch org, you’ll want to review some of the previous articles to take that pre-requisite step or follow the instructions in the Github repo on how to clone and deploy the application.
-
Javascript Unit Testing
The Javascript car configurator app we are going to test can be found on the eCars app Github repository. If you’ve been following along with this series, then you should have already done some previous setup work installing the repo in VS Code and deploying it to a Salesforce scratch org.
-
Modern App Development on Salesforce And Heroku - the Entire Series
I'll share a step-by-step tutorial building the app, what I've learned, some of the highlights, and my take on some of the content. You can find all the code for the project here.
- More Scaling Salesforce Apps Using Heroku Microservices
-
Scale Salesforce Apps Using Microservices on Heroku
To start, let’s review the steps for Automated Deployment as also listed on the readme section in the Github repo. Julian has created a script (a Node.js program that will make this process easier) to get this up and running in the Salesforce and Heroku platforms. All of the installation pre-reqs, keys, and steps to configure your operating system before we move forward with deployment can be found here.
What are some alternatives?
apex-recipes - A library of concise, meaningful examples of Apex code for common use cases following best practices.
Aura2LWC - This VSCode Extension automatically converts Aura Components to LWC
vscode-jest - The optimal flow for Jest based testing in VS Code
lwc-recipes - A collection of easy-to-digest code examples for Lightning Web Components on Salesforce Platform
sfdc-ui-lookup-lwc - Salesforce Lookup Component built with Lightning Web Components.
pdfmake - Client/server side PDF printing in pure JavaScript
lwc-virtual-scroll-sample - Virtual Scroll in Lightning Web Component
node-rdkafka - Node.js bindings for librdkafka
eslint-plugin-lwc - Official ESLint rules for LWC
dreamhouse-lwc - Sample application for Lightning Web Components on Salesforce Platform. Part of the sample gallery. Real estate use case. Get inspired and learn best practices.