Skip to content

Instantly share code, notes, and snippets.

View bingeboy's full-sized avatar
🏠

JP McGarrity bingeboy

🏠
View GitHub Profile
@haroldtreen
haroldtreen / promise-test.js
Last active August 25, 2023 13:59
Testing promise rejection with Mocha
const { assert } = require('chai');
function isError(e) {
if (typeof e === 'string') {
return Promise.reject(new Error(e));
}
return Promise.resolve(e);
}
@iest
iest / readme.md
Created November 29, 2016 18:26
How we went from css modules & sass to glamor

We started out with sass files with something like this (obvious brevity is obvious):

// colors.scss
$green: #37ab2e;
$white: #FFFFFF;

// skin.scss
.bg_green { color: $green; }
.fg_white { color: $white; }