UNPKG

express-socket.io-session

Version:

Share a cookie-based express-session middleware with socket.io

14 lines (11 loc) 390 B
var sharedsession = require('./index'); var hash = require('./lib/hash'); test('hash() hashes predictably', function() { expect(hash({ a: 2 })).toBe(2100756332); }); test('hash() is idempotent', function() { expect(hash({ a: 2 })).toBe(hash({ a: 2 })); }); test('sharedsession() returns a function that accepts two arguments', function() { expect(sharedsession()).toHaveLength(2); });