Skip to content

Instantly share code, notes, and snippets.

Law & Order, All lives matter

Eric calidion

Law & Order, All lives matter
View GitHub Profile
calidion / custom-error.js
Created Jul 10, 2016 — forked from justmoon/custom-error.js
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor); =;
this.message = message;
this.extra = extra;
require('util').inherits(module.exports, Error);
calidion / login.test.js
Created May 1, 2016 — forked from joaoneto/login.test.js
Login session test with mocha
View login.test.js
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
You can’t perform that action at this time.