From fa80b204fb404c124e7382c4f8605206b50ea393 Mon Sep 17 00:00:00 2001 From: Jared Hanson Date: Wed, 18 May 2022 08:08:07 -0700 Subject: [PATCH] Fix tests. --- test/http/request.test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/http/request.test.js b/test/http/request.test.js index d13b39a7..c6521a1e 100644 --- a/test/http/request.test.js +++ b/test/http/request.test.js @@ -419,10 +419,14 @@ describe('http.ServerRequest', function() { req.session = { id: '1' }; req.session['passport'] = {}; req.session['passport'].user = '1'; + req.session.save = function(cb) { + expect(req.session['passport'].user).to.be.undefined; + process.nextTick(cb); + }; req.session.regenerate = function(cb) { req.session = { id: '2' }; process.nextTick(cb); - } + }; var error; @@ -466,10 +470,14 @@ describe('http.ServerRequest', function() { req.session = { id: '1' }; req.session['passport'] = {}; req.session['passport'].user = '1'; + req.session.save = function(cb) { + expect(req.session['passport'].user).to.be.undefined; + process.nextTick(cb); + }; req.session.regenerate = function(cb) { req.session = { id: '2' }; process.nextTick(cb); - } + }; var error;