How to Add an SSL Certificate and Custom Namecheap Domain to a Gitlab Pages Site

Originally published on Medium for freeCodeCamp.org, which can be found here. Adding an SSL certificate and custom Namecheap domain to a GitLab Pages site can be a bit more challenging than it seems. Crucial pieces of the setup information live in sometimes dense documentation across different sites. It can be hard to tell if you’ve set things up correctly given that you have to wait hours to confirm your changes have propagated....

October 30, 2018

Determining Whether Your Javascript Object is of Type X

Originally published on Medium, which can be found here. There are times when you’re interested in knowing additional details about the Javascript Object that you’re handling, such as whether you’re handling an Array, Date, or standard Object. However, the typeof operator, when used against these different objects, returns the following results: console.log(typeof [1,2,3]) // returns 'object' console.log(typeof {hello: 'world'}) // returns 'object' console.log(typeof new Date()) // returns 'object' Why? A major pitfall of using the typeof operator in order to determine the type of objects such as Array and Date is that they return 'object’....

April 20, 2018

Jest Snapshot Testing With Dates and Times

Originally published on Medium, which can be found here. Snapshot testing is great for quickly creating unit tests for components by getting a ‘snapshot’ of what a component looks like when it’s rendered on the page given certain prop values. This removes the need to manually check the amount of specific elements being rendered on the component, or what individual pieces of text are based on the values of props....

September 19, 2017