Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var Mailer = require('../lib/mailer');
var util = require('../lib/util');
var seed = require('pouchdb-seed-design');
var request = require('superagent');
var config = require('./test.config.js');
var chai = require('chai');
var sinon = require('sinon');
var expect= chai.expect;
chai.use(require('sinon-chai'));
var dbUrl = util.getDBURL(config.dbServer);
var emitter = new events.EventEmitter();
PouchDB.setMaxListeners(20);
var userDB = new PouchDB(dbUrl + "/superlogin_test_users");
var keysDB = new PouchDB(dbUrl + "/superlogin_test_keys");
var testUserForm = {
name: 'Super',
username: 'superuser',
email: 'superuser@example.com',
password: 'superlogin',
confirmPassword: 'superlogin',
age: '32',
zipcode: 'ABC123'
};
var emailUserForm = {
name: 'Awesome',
email: 'awesome@example.com',