From 854c93a75ae643d0c5849b51263d54589e0c3b25 Mon Sep 17 00:00:00 2001 From: rolljee Date: Tue, 7 Nov 2023 16:20:27 +0100 Subject: [PATCH] Update test with async support --- test/passport/passport_strategy.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/passport/passport_strategy.test.js b/test/passport/passport_strategy.test.js index d542dadb..3a7478d1 100644 --- a/test/passport/passport_strategy.test.js +++ b/test/passport/passport_strategy.test.js @@ -104,7 +104,7 @@ describe('OpenIDConnectStrategy', () => { }); }); - describe('initate', function () { + describe('initiate', function () { it('starts authentication requests for GETs', async function () { const params = { foo: 'bar' }; const strategy = new Strategy({ client: this.client, params }, () => {}); @@ -128,7 +128,7 @@ describe('OpenIDConnectStrategy', () => { ); }); - it('starts authentication requests for TPIL GETs', function () { + it('starts authentication requests for TPIL GETs', async function () { const params = { iss: 'https://op.example.com' }; const strategy = new Strategy({ client: this.client, params }, () => {}); @@ -136,7 +136,7 @@ describe('OpenIDConnectStrategy', () => { req.session = {}; strategy.redirect = sinon.spy(); - strategy.authenticate(req); + await strategy.authenticate(req); expect(strategy.redirect.calledOnce).to.be.true; const target = strategy.redirect.firstCall.args[0];