Tag: TIL

Suppressing Static Initializers with Mockito + Powermock

Often as developers, we need to add unit testing to legacy code while being unable to make non-trivial changes to the code under test. In legacy code, logging and other resources are often set up in a static initializer. That code won’t execute nicely in a unit testing environment (could be using JNDI or something […]

package.json scripts

When using npm (commonly with nodejs), we can pre-define command line commands in the package.json file, using the scripts option. Use Case: Pre-Standardized Commands Per Organization Description: Allow teams to standardize commands to allow easy cross-project development and collaboration. In our example, we will standardize a command extended-test that should be run by all developers […]