This file contains 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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var path = require('path'); | |
var exec = require('child_process').exec; | |
var TIMEOUT = 20000; | |
var tests = fs.readdirSync(__dirname).filter(function(file) { | |
return !fs.statSync(path.join(__dirname,file)).isDirectory(); |
This file contains 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
test('remove should work without callback', function(t) { | |
fixtures.load(function() { | |
var beers = sub(db.beers, 'DK', 'country'); | |
beers.remove(); | |
setTimeout(function() { | |
db.beers.count(function(err, n) { | |
t.equal(n, 2); | |
t.end(); | |
}); | |
}, 500); |
This file contains 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
/** @jsx React.DOM */ | |
var React = require('react') | |
module.exports = React.createClass({ displayName: 'SearchPopup', | |
propTypes: { | |
onSelect: React.PropTypes.func.isRequired, | |
items: React.PropTypes.arrayOf( | |
React.PropTypes.shape({ | |
columns: React.PropTypes.arrayOf(React.PropTypes.string).isRequired, | |
}) |
This file contains 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
var root = require('root'); | |
var github = require('github-auth'); | |
var app = root(); | |
var gh = github('blah', 'blehbleh', { | |
users: ['sorribas'] | |
}); | |
app.get('/login', function(req, res) { | |
res.send('<a href="'+gh.loginUrl+'">Login</a>'); |
This file contains 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
// taken from http://visionmedia.github.io/mocha/ | |
describe('Connection', function(){ | |
var db = new Connection | |
, tobi = new User('tobi') | |
, loki = new User('loki') | |
, jane = new User('jane'); | |
beforeEach(function(done){ | |
db.clear(function(err){ |
NewerOlder