Skip to content

Instantly share code, notes, and snippets.

Billy Shih bbshih

Block or report user

Report or block bbshih

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bbshih / momentMock.js
Last active Feb 26, 2020 — forked from lededje/gist:44aeddf1dc2a5e6064e3b29dc35a7a2d
Jest Mocking Moment to same time zone for tests
View momentMock.js
// To mock globally in all your tests, add to setupTestFrameworkScriptFile in config:
jest.mock('moment', () => {
const moment = require.requireActual('moment-timezone');'America/Los_Angeles'); // Whatever timezone you want
return moment;

Keybase proof

I hereby claim:

  • I am bbshih on github.
  • I am billyshih ( on keybase.
  • I have a public key whose fingerprint is 6863 969C 0096 38AA 4FF1 1E10 CEAB D8DB B627 4091

To claim this, I am signing this object:

bbshih / form.js
Last active Dec 19, 2015 — forked from ouranos/form.js
Additional JS to use Formtastic-Bootstrap with Client_Side_Validations
View form.js
ClientSideValidations.formBuilders["FormtasticBootstrap::FormBuilder"] = {
add: function (element, settings, message) {
if ('valid') !== false) {'valid', false);
var $parent = element.closest('.controls');
} else {
You can’t perform that action at this time.