From 250312152a85282edd9064b468a94d62853cffc4 Mon Sep 17 00:00:00 2001 From: Root-Core Date: Wed, 19 Apr 2017 00:33:26 +0200 Subject: [PATCH] Fixed mocha tests by not using `expiresInMinutes` Using `expiresInMinutes` leads to errors, as it was deprecated in `jsonwebtoken` > 5.7.0. We should use `expiresIn` instead. --- package.json | 2 +- test/fixture/index.js | 2 +- test/fixture/namespace.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6aedca6..bd0589a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "license": "MIT", "dependencies": { - "jsonwebtoken": "^5.7.0", + "jsonwebtoken": "^7.3.0", "xtend": "~4.0.1" }, "devDependencies": { diff --git a/test/fixture/index.js b/test/fixture/index.js index 432c474..f897021 100644 --- a/test/fixture/index.js +++ b/test/fixture/index.js @@ -38,7 +38,7 @@ exports.start = function (options, callback) { }; // We are sending the profile inside the token - var token = jwt.sign(profile, options.secret, { expiresInMinutes: 60*5 }); + var token = jwt.sign(profile, options.secret, { expiresIn: 60*60*5 }); res.json({token: token}); }); diff --git a/test/fixture/namespace.js b/test/fixture/namespace.js index d3de1f5..eff8223 100644 --- a/test/fixture/namespace.js +++ b/test/fixture/namespace.js @@ -38,7 +38,7 @@ exports.start = function (callback) { }; // We are sending the profile inside the token - var token = jwt.sign(profile, options.secret, { expiresInMinutes: 60*5 }); + var token = jwt.sign(profile, options.secret, { expiresIn: 60*60*5 }); res.json({token: token}); });