Skip to content

Instantly share code, notes, and snippets.

View dmatteo's full-sized avatar

Domenico Matteo dmatteo

View GitHub Profile
@dmatteo
dmatteo / podio-push-sample.js
Last active December 21, 2017 04:53 — forked from haugstrup/podio-push-sample.js
Sample for working with Podio's CometD/Bayeux service.
/*
Based on example code from Carl-Fredrik Herö from Elvenite AB <http://elvenite.se/>
Install dependencies:
* npm install faye
* npm install git://github.com/haugstrup/podiojs.git
Add needed info:
* Populate client_id and client_secret for your API key
@dmatteo
dmatteo / mocha.sh
Last active October 25, 2015 18:18
# We can be generic and grep for an entire 'describe' clause
$ mocha -g PlainField
# Or we can be very specific and only run the test that we want
$ mocha -g 'should render as a PlainFieldValueComponent with `props.showLabel === false`'
@dmatteo
dmatteo / test.js
Last active September 15, 2016 09:21
Testing a React.js component with `jsdomify` and `mocha`
import expect from 'unexpected';
import jsdomify from 'jsdomify';
describe('MyComponent', () => {
let React, TestUtils, getInstance, MyComponent;
before(() => {
jsdomify.create();