From 18052fdbf63db8fe637cb5bcd5b0fc0a26aa368a Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Thu, 4 Aug 2022 04:01:51 +0500 Subject: [PATCH] test: fixed failed specs --- api/src/routes/api/spec/web.spec.ts | 23 +++++++++++------------ web/src/context/appContext.tsx | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/api/src/routes/api/spec/web.spec.ts b/api/src/routes/api/spec/web.spec.ts index 45b07f1..12bc4db 100644 --- a/api/src/routes/api/spec/web.spec.ts +++ b/api/src/routes/api/spec/web.spec.ts @@ -39,12 +39,11 @@ describe('web', () => { describe('home', () => { it('should respond with CSRF Token', async () => { - await request(app) - .get('/') - .expect( - 'set-cookie', - /_csrf=.*; Max-Age=86400000; Path=\/; HttpOnly,XSRF-TOKEN=.*; Path=\// - ) + const res = await request(app).get('/').expect(200) + + expect(res.text).toMatch( + /