From 2ea577c092364130a1d6d22fbfbcd0fc459a3edf Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Tue, 26 Dec 2023 00:14:55 +0100 Subject: [PATCH] test: use t.error (#322) --- test/jwt.test.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/jwt.test.js b/test/jwt.test.js index b7fe68b..69a316c 100644 --- a/test/jwt.test.js +++ b/test/jwt.test.js @@ -78,7 +78,7 @@ test('register', function (t) { public: publicKey } }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -88,7 +88,7 @@ test('register', function (t) { fastify.register(jwt, { secret: Buffer.from('some secret', 'base64') }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -98,7 +98,7 @@ test('register', function (t) { fastify.register(jwt, { secret: (request, token, callback) => { callback(null, Buffer.from('some secret', 'base64')) } }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -108,7 +108,7 @@ test('register', function (t) { fastify.register(jwt, { secret: (request, token) => Promise.resolve(Buffer.from('some secret', 'base64')) }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -118,7 +118,7 @@ test('register', function (t) { fastify.register(jwt, { secret: async (request, token) => Buffer.from('some secret', 'base64') }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -172,7 +172,7 @@ test('register', function (t) { sub: 'Some subject' } }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) }) @@ -194,7 +194,7 @@ test('register', function (t) { allowedAud: 'Some audience' } }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -223,7 +223,7 @@ test('register', function (t) { allowedSub: 'Some subject' } }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) @@ -249,7 +249,7 @@ test('register', function (t) { allowedSub: 'Some subject' } }).ready(function (error) { - t.equal(error, undefined) + t.error(error) }) }) })