Skip to content

Instantly share code, notes, and snippets.

@othiym23
Last active August 29, 2015 14:17
Show Gist options
  • Save othiym23/8442dfaed6289dd94f09 to your computer and use it in GitHub Desktop.
Save othiym23/8442dfaed6289dd94f09 to your computer and use it in GitHub Desktop.
var test = require("tape")
test("redis-url", function (t) {
t.plan(2);
var redis = require('..').createClient()
var redis2 = require('..').createClient('redis://localhost:6379')
redis.set('foo', 'bar');
redis.get('foo', function(err, res) {
if (err) throw err
t.equal(res, 'bar', "foo should equal bar")
redis.quit()
})
redis2.set('food', 'bar');
redis2.get('food', function(err, res) {
if (err) throw err
t.equal(res, 'bar')
redis2.quit()
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment