There are a few other useful tricks that will help organise your testing that I feel worth mentioning and not immediately clear. Ideally when you are completing a number of tests on a single function you can group these tests under a single describe() statement. This provides another opportunity the add some description of what … Continue reading Testing a React app with Jest (Part 2)
Tag: Front End Dev
Testing a React app with Jest (Part 1)
This post is going to provide an introduction to the basics of Jest a javascript testing framework that is included in the Create-React-App, which if you haven't heard of is a great starting point for your new React App. Jest provides all the functionality required to set up unit tests for your javascript application. This … Continue reading Testing a React app with Jest (Part 1)
Deploying a static webpage using GitHub pages
I've been working through a number of projects on FreeCodeCamp and on the project guidelines it suggests you can deploy your project whichever way you want. GitHub pages feature provides an extremely easy and most importantly free way to demo your hard work! Secondary to providing some actual live links that can be displayed on … Continue reading Deploying a static webpage using GitHub pages
Controlling your stateless React components
This is a very short summary of React.memo that was introduced in React 16.6 in Oct 2018 and can be used as a wrapper around stateless functional components. Some examples demonstrating stateless functional components are below: import React from 'react'; //nameless default functional component export default (props) => { return <button disabled={props.buttonDisabled}>{props.text}</button> } //named functional … Continue reading Controlling your stateless React components
Configuring your Yarn
I currently use Yarn at work rather than standard npm to manage node.js packages for any user interface developed using JavaScript and more precisely React. As today I was changing my working laptop I had to ensure my Yarn configuration file was located in the right folder to ensure I still had the same experience … Continue reading Configuring your Yarn