test: another test fix

This commit is contained in:
Barış Soner Uşaklı
2026-02-08 19:21:35 -05:00
parent 6cb6cf7d4d
commit 94873c33e1

View File

@@ -140,11 +140,11 @@ describe('authentication', () => {
it('should regenerate the session identifier on successful login', async () => {
const matchRegexp = /express\.sid=s%3A(.+?);/;
const { hostname, path } = new URL(nconf.get('url'));
const sid = String(jar.store.idx[hostname][path]['express.sid']).match(matchRegexp)[1];
const { hostname, pathname } = new URL(nconf.get('url'));
const sid = String(jar.store.idx[hostname][pathname]['express.sid']).match(matchRegexp)[1];
await helpers.logoutUser(jar);
const newJar = (await helpers.loginUser('regular', 'regularpwd')).jar;
const newSid = String(newJar.store.idx[hostname][path]['express.sid']).match(matchRegexp)[1];
const newSid = String(newJar.store.idx[hostname][pathname]['express.sid']).match(matchRegexp)[1];
assert.notStrictEqual(newSid, sid);
});