Code with Hugo: JS & Node.js in Prod logo

Code with Hugo: JS & Node.js in Prod

Subscribe
Archives
April 29, 2019

Assert over specific mock call parameters with Jest - Code with Hugo - Apr 29th 2019

Hot off the press

Jest assert over single or specific argument/parameters with .toHaveBeenCalledWith and expect.anything(): With Jest it’s possible to assert of single or specific arguments/parameters of a mock function call with .toHaveBeenCalled/.toBeCalled and expect.anything(). This post goes through how and why you would do that.

Example repository: github.com/HugoDF/jest-specific-argument-assert.

If you missed it

An enterprise-style Node.js REST API setup with Docker Compose, Express and Postgres: The why and how of enterprise-style Node.js application.

Add days to a Date in vanilla JavaScript: Despite the JavaScript Date warts, it's straightforward to add days to a date in JavaScript.

From AngularJS to Vue.js, CommonJS and Jest: How to start migrating an AngularJS codebase to Vue component by component.

From the web

The Use Of assert() In SQLite by : The assert(X) macro is part of standard C, in the header file. SQLite adds three other assert()-like macros named NEVER(X), ALWAYS(X), and testcase(X). assert(X) → The assert(X) statement indicates that the condition X is always true. In other words, X is an invariant.

Goodbye webpack: Building Vue.js Applications Without webpack - Markus Ober by Markus Oberlehner: First of all, let me say this: webpack is great! Developing JavaScript applications would look quite different if it wasn’t for webpack. Having said that, oftentimes it feels pretty foreign to me, having to set up a quite complicated build process to build a rather simple JavaScript app.

Introducing Node.js 12 – Node.js Foundation – Medium by Node.js Foundation: This blog was written by Bethany Griggs and Michael Dawson, with additional contributions from the Node.js Release Team and Technical Steering committee. We are excited to announce Node.js 12 today.

Don't miss what's next. Subscribe to Code with Hugo: JS & Node.js in Prod:
Powered by Buttondown, the easiest way to start and grow your newsletter.