node-replay
node-replay copied to clipboard
require('supertest') has to come before require('replay')
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.