-
P2: the collaboration tool from WordPress
Today I received this email from WordPress. A new tool to facilitate remote teams collaboration “Fewer emails. More progress.” it’s a good argument to test it. — As communication moves increasingly online, staying organized can be a challenge. The way we work at WordPress.com is unique. We are a global team of more than 1,200 Read more
-

Mock Axios with Jest
Mocking in unit tests serves several purposes: Overall, mocking during unit tests provides greater control, speed, reproducibility, reliability, and fault isolation, enabling you to thoroughly test individual units of code in an efficient and focused manner. Example of mocking with a successful response import axios from "axios"; jest.mock("axios"); const mockedAxios = axios as jest.Mocked<typeof axios="">; Read more
-

Salesforce client for an Apex RESTful web service
Many businesses today are leveraging Salesforce to run their day-to-day operations. With its diverse capabilities, it can easily help manage customer relationships, develop applications, and conduct business intelligence analysis. For applications that need access to the Salesforce platform, one of the most popular options is to use the Apex RESTful web service. Let’s see an Read more
-
How to convert sforce.apex.execute to Lightning
Let’s see how to convert a Salesforce JavaScript button that uses sforce.apex.execute in to Lightning Experience. The good news is you will reuse this code and the approach for all your similar buttons Imagine you have this JavaScript button in your Salesforce instance. OK, probably your button is larger and more complex but the idea Read more
-

Salesforce – Mock callouts in Apex
By using this approach, you can simulate different scenarios and responses to ensure your code handles callouts correctly during testing. Read more
-
Download Salesforce metadata using SFDX
cd some/directory sfdx auth:web:login -a my@username.dev –instanceurl=https://my-sfdc-instance.my.salesforce.com sfdx force:project:create -n myProject –manifest cd myProject sfdx config:set defaultusername=my@username.dev # Modify the package xml to retieve whatever we want sfdx force:source:retrieve -x manifest/package.xml # or retrieve this way sfdx force:source:retrieve -m “ApexClass:MyApexClass” Photo by Cookie the Pom on Unsplash Read more