Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
import Promise from 'bluebird';
import Test from 'supertest/lib/test';
Test.prototype.end = Promise.promisify(Test.prototype.end);
import supertest from 'supertest';
import Koa from 'koa';
import AuthX, { EmailStrategy, GoogleStrategy, PasswordStrategy, SecretStrategy, InContactStrategy } from '../../src/index.js';
module.exports = {
setup: function(done){
global.authx = new AuthX(global.setup.config, {
email: EmailStrategy,
google: GoogleStrategy,
password: PasswordStrategy,
secret: SecretStrategy,
incontact: InContactStrategy
});
var supertest = require('supertest');
var config = require('./config');
var Test = require('supertest/lib/test');
originalAssert = Test.prototype.assert;
Test.prototype.assert = function kongaAssert(resError, res, fn){
if (!res && resError) return fn.call(this, resError);
return originalAssert.call(this, resError, res, fn);
};
var client = supertest(config.kong_url);
module.exports = client;
var supertest = require('supertest');
var config = require('./config');
var Test = require('supertest/lib/test');
originalAssert = Test.prototype.assert;
Test.prototype.assert = function kongaAssert(resError, res, fn){
if (!res && resError) return fn.call(this, resError);
return originalAssert.call(this, resError, res, fn);
};
var client = supertest(config.kong_url);
module.exports = client;