From e52a7315b8d7834c4f72457d6f583010b5c539ea Mon Sep 17 00:00:00 2001 From: arvindpndit Date: Sat, 23 Dec 2023 12:16:24 +0530 Subject: [PATCH] fix: decodeJwt test case --- week-3/02-jwt/tests/index.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/week-3/02-jwt/tests/index.spec.js b/week-3/02-jwt/tests/index.spec.js index 8400b88ee2..428551bbdf 100644 --- a/week-3/02-jwt/tests/index.spec.js +++ b/week-3/02-jwt/tests/index.spec.js @@ -26,10 +26,10 @@ describe('signJwt', () => { }); describe('decodeJwt', () => { - test('decodes a jwt with diff password correctly', () => { + test('cant decode a jwt with diff password incorrectly', () => { const token = jwt.sign({ username: 'kirat@gmail.com', password: '123456' }, "randomPassword"); const decoded = decodeJwt(token); - expect(decoded).toBe(true); + expect(decoded).toBe(false); }); test('decodes a jwt with same password correctly', () => {