Skip to content

Instantly share code, notes, and snippets.

@weiting-tw
weiting-tw / promise-test.js
Created August 1, 2018 08:45 — forked from haroldtreen/promise-test.js
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);
}
@weiting-tw
weiting-tw / Git_mergetool_commands
Last active January 11, 2018 03:29 — forked from RohanBhanderi/Git_mergetool_commands
Git Mergetool and difftool with Beyond Compare 4
//Git Mergetool and difftool with Beyond Compare 4
//For Windows
//IF running this command in git bash then escape $ with \
git config --global diff.tool bc4
git config --global difftool.bc4.cmd /usr/local/bin/bcomp \"\$LOCAL\" \"\$REMOTE\"
git config --global difftool.prompt false
git config --global merge.tool bc4
git config --global mergetool.bc4.cmd /usr/local/bin/bcomp \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\"
git config --global mergetool.bc4.trustExitCode true