👋 Welcome to this week's newsletter where we discuss how to programmatically fail a test, why you would want to do so and more.
Jest explicitly or arbitrarily force fail() a test: When testing code with Jest, it can sometimes be useful to fail a test arbitrarily.
How to run Jest tests sequentially: By default Jest runs tests in parallel with a “a worker pool of child processes that run tests” (Jest CLI docs).
Jest Full and Partial Mock/Spy of CommonJS and ES6 Module Imports: The example repository is available at github.com/HugoDF/mock-spy-module-import.
How to run, ignore or skip Jest tests, suites and files: When debugging or writing units tests with Jest it can be useful to specify a single file or test to run or to exclude a specific failing test for the Jest run.
Super-powered newsletter content with Pocket and Netlify Lambda: An example Netlify Lambda to fetch all “newsletter” posts from Pocket.
Offline listings by Remy Sharp: The other week I finally pushed full offline access to my blog. I'd taken a lot of inspiration from Jeremy Keith's service worker from his blog.
(Why) Some HTML is "optional" by Remy Sharp: Chris Coyier blogged recently on weird looking HTML. It's a nice short post and I'd say it's worth knowing these optional features (potentially known as defaults). My favourite optional is
<script> and not having to include the type attribute.
Craftsmanship—The Alternative to the Four Hour Work Week Mindset: Often times when I attend a conference or a networking event I am surprised how many people operate at the periphery of the tech industry. Social media gurus, SEO ‘ninjas’, bloggers, etc. It’s a coterie of tech ‘club promoters.’ The hype men of the industry. ‘Hack your way to success.
How Firebase Interviewed Software Engineers • Andrew's Blog: Today, Firebase has a large team with hundreds of engineers. Before the Google acquisition, however, we had a small team of just 24 exceptional people that I firmly believe was among the strongest of its kind in the world. A big part of that success was the way we interviewed software engineers.