Snapshot testing with PHPUnit

use Spatie\Snapshots\MatchesSnapshots; class OrderTest { use MatchesSnapshot; class test_it_casts_to_json() { $orderId = new Order(1); $this->assertMatchesJsonSnapshot($order->toJson()); } } Again great work by the folks at Spatie: The difference between a classic assertEquals and an assertMatchesSnapshot is that you don’t write the expectation yourself when snapshot testing. When a snapshot assertion happens for the first time, it …

LocalStack – A fully functional local AWS cloud stack

At work we’ve been using several separate docker images – such as instructure/fake-s3 and airdock/fake-sqs, orchestrated by docker-compose – to run a few of the Amazon Web Services locally. LocalStack provides the whole lot in one: LocalStack provides an easy-to-use test/mocking framework for developing Cloud applications. Currently, the focus is primarily on supporting the AWS …

10 Lodash Features You Can Replace with ES6 ES2015

Lodash is the most depended on npm package right now, but if you’re using ES6 ES2015, you might not actually need it. In this article, we’re going to look at using native collection methods with arrow functions and other new ES6 features to help us cut corners around many popular use cases. 10 Lodash Features …

Automatic Bullseye MOVING Dartboard

Former NASA engineer Mark Roper: I fulfilled a 3 year long dream to create a dartboard where you get a bullseye every time thanks to some engineering. Basically, you throw a dart and then a Vicon motion capture system tracks the dart in the air. We use those x,y,z positions in matlab to predict where …

An Animated Intro to RxJS

In Reactive Animations with CSS Variables the subject of RxJS was touched. If you’re not familiar with RxJS, CSS-Tricks has nice introductory article on the subject: You might have heard of RxJS, or ReactiveX, or reactive programming, or even just functional programming before. These are terms that are becoming more and more prominent when talking …

Why you’d want to hold off buying a Nintendo Switch just yet

Painful to watch: Many Switch users are experiencing problems from day one. Reports are submitted everyday with new pictures and videos. Loud crashes, errors, bricked blue/orange screens, dead pixels, ingame artifacts, unrecognized cartridges, loose/woobly joycons, scratches and design flaws.