If the component is the default export: jest.mock(“./MyComponent”, () => () => <div>Hello World</div>); If the component is a named export: jest.mock(“./MyComponent”, () => ({ MyComponent: () => <div>Hello World</div> }));
Author Archives: Linden Melvin
The Most Basic HTML Template
How to Create a Node Express API
Make sure node is installed Make sure npm works by running npm -v, you should see a version number Create new directory called express-example Run cd express-example Run git init Run npm init -y Run npm install express Create .gitignore with /node_modules/ Create app.js with the following content: Run node app.js and navigate to localhost:5000Continue reading “How to Create a Node Express API”
How to Install Node.js
Make sure you have brew installed Open a Terminal Run brew install node Confirm Node is installed by running node -v, you should see a version number Congratulations! You have installed Node.js!
How to Install Homebrew
Open Terminal Run: To confirm Homebrew is installed, run brew -v and confirm that you see a version number. Congratulations! You have installed Homebrew! More details can be found here: https://brew.sh/