Skip to content

Commit 8078b11

Browse files
committed
fix spelling error in error message
1 parent f13b3fb commit 8078b11

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ JWT.verify = function(jwtString, secretOrPublicKey, options, callback) {
201201
return done(new JsonWebTokenError('iat required when maxAge is specified'));
202202
}
203203
if (Date.now() - (payload.iat * 1000) > maxAge) {
204-
return done(new TokenExpiredError('maxAge exceded', new Date(payload.iat * 1000 + maxAge)));
204+
return done(new TokenExpiredError('maxAge exceeded', new Date(payload.iat * 1000 + maxAge)));
205205
}
206206
}
207207

test/verify.tests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('verify', function() {
7070

7171
jwt.verify(token, key, options, function (err, p) {
7272
assert.equal(err.name, 'TokenExpiredError');
73-
assert.equal(err.message, 'maxAge exceded');
73+
assert.equal(err.message, 'maxAge exceeded');
7474
assert.equal(err.expiredAt.constructor.name, 'Date');
7575
assert.equal(Number(err.expiredAt), 1437018582321);
7676
assert.isUndefined(p);
@@ -93,7 +93,7 @@ describe('verify', function() {
9393

9494
jwt.verify(token, key, options, function (err, p) {
9595
assert.equal(err.name, 'TokenExpiredError');
96-
assert.equal(err.message, 'maxAge exceded');
96+
assert.equal(err.message, 'maxAge exceeded');
9797
assert.equal(err.expiredAt.constructor.name, 'Date');
9898
assert.equal(Number(err.expiredAt), 1437018582800);
9999
assert.isUndefined(p);

0 commit comments

Comments
 (0)