This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toISOStringWithTimezone = date => { | |
const tzOffset = -date.getTimezoneOffset(); | |
const diff = tzOffset >= 0 ? '+' : '-'; | |
const pad = n => `${Math.floor(Math.abs(n))}`.padStart(2, '0'); | |
return date.getFullYear() + | |
'-' + pad(date.getMonth() + 1) + | |
'-' + pad(date.getDate()) + | |
'T' + pad(date.getHours()) + | |
':' + pad(date.getMinutes()) + | |
':' + pad(date.getSeconds()) + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import nock from 'nock'; | |
import chai from 'chai'; | |
import request from 'request' | |
const expect = chai.expect; | |
const tax = { | |
calculate: (subtotal, state, done) => { | |
if (state !== 'CA') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import sinon from 'sinon'; | |
import chai from 'chai'; | |
const assert = chai.assert; | |
const Database = { | |
save: (user, cb) => { | |
cb(); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone [email protected]:80xer/study.git | |
$ git remote -v | |
origin [email protected]:80xer/study.git (fetch) | |
origin [email protected]:80xer/study.git (push) | |
$ git config -l | grep '^remote\.' | |
[email protected]:80xer/study.git | |
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* | |
$ git remote add all [email protected]:80xer/study.git | |
$ git remote -v |