Skip to content

Instantly share code, notes, and snippets.

@ncarbon
ncarbon / ultimate-ut-cheat-sheet.md
Created July 15, 2018 22:20 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@ncarbon
ncarbon / memwatch_detect.js
Created June 7, 2018 04:43 — forked from doron2402/memwatch_detect.js
Using memwatch-next in order to detect memory leak node 6.10.x
'use strict';
const Memwatch = require('memwatch-next');
const Util = require('util');
if (Config.env === 'production') {
/**
* Check for memory leaks
*/
let hd = null;
Memwatch.on('leak', (info) => {