Skip to content

Instantly share code, notes, and snippets.

View johnmutuma5's full-sized avatar
🏠
Working from home

JohnM johnmutuma5

🏠
Working from home
View GitHub Profile
@johnmutuma5
johnmutuma5 / hello.js
Last active July 18, 2018 10:25
Test gist
const greet = () => console.log('hello world');
module.exports.greet = greet;
// Prone to bugs! This is for learning and demonstration purposes only
let prev = 0, curr = 1;
// the generator
function* fibGen(n) {
const pos = 1;
for(let i=pos; i < n; ++i) {
[prev, curr] = yield asyncFetchPrevAndCurrValues(n); // returns a promise
{
"name": "Alice Doe",
"origin": "Kampala",
"destination": "New york",
"gender": "Male",
"manager": "John Mutuma",
"department": "TDD",
"role": "Senior Consultant",
"status": "Open",
"departureDate": "2018-08-16",
{
"name": "John Doe",
"origin": "Kampala",
"destination": "New york",
"gender": "Male",
"manager": "Alice Doe",
"department": "TDD",
"role": "Senior Consultant",
"tripType": "multi",
"trips": [
@johnmutuma5
johnmutuma5 / ultimate-ut-cheat-sheet.md
Created December 7, 2018 13:27 — 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