node-replay icon indicating copy to clipboard operation
node-replay copied to clipboard

require('supertest') has to come before require('replay')

Open ggb667 opened this issue 7 years ago • 0 comments

Supertest has to come before replay's require because integration points for http are different. I think this could be fixed to make it agnostic.

//const Replay  = require('replay');
//Replay.mode = 'replay';
//Replay.fixtures = __dirname + '/fixtures/replay';var server = require("../../server/server");
var server = require("../../server/server");
var msContentPersonalization = require('supertest')(server);//('http://localhost:3101');
const Replay  = require('replay');
Replay.mode = 'replay';
Replay.fixtures = __dirname + '/fixtures/replay';

If you swap commenting for the bottom and top 3 lines node-replay won't function.

ggb667 avatar Mar 05 '18 16:03 ggb667