-
Node.js
Playwright meets JUnit 5
Playwright is a Node.js-based tool for automating browsers. It supports all modern rendering engines including Chromium, WebKit and Firefox. Playwright…
Read More » -
Node.js
Starter template for prototyping and building CLI tools with Node.js and TypeScript
Why another starter template? I created this template to help myself to build some simple tools and prototypes while learning…
Read More » -
Core Java
Manage multiple Java SDKs with asdf with ease
asdf is a helpful command-line tool that allows you to manage and switch between different versions of programming language runtimes…
Read More » -
JavaScript
Parameterized tests in JavaScript with Jest
Parameterized tests are used to test the same code under different conditions. One can set up a test method that…
Read More » -
JavaScript
Testing promise rejection in JavaScript with Jest
The code Let’s consider a simple function that returns a Promise that can either resolve or reject depending on the…
Read More » -
JavaScript
Testing exceptions in JavaScript with Jest
The code Let’s consider a simple function that checks for equality of two passwords, and it throws an error when…
Read More » -
Core Java
Convert time unit to duration in Java
java.util.concurrent.TimeUnit represents time durations in Java at a given unit of granularity and provides utility methods to convert across units.…
Read More » -
Core Java
Switch as an expression in Java with Lambda-like syntax
As of Java 14, the switch expression has an additional Lambda-like (case ... -> labels) syntax and it can be…
Read More » -
Core Java
Record type in Java
JDK 14, released in March 2020, introduced records (preview language feature) which provide a compact syntax for declaring classes whose…
Read More »