Skip to content

Commit 5498bdc

Browse files
MitMaroziluvatar
authored andcommitted
Update dependencies used for running tests (#518)
Update chai and mocha to the latest versions and update nyc to the latest version that supports Node 4.
1 parent 877bd57 commit 5498bdc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
},
4949
"devDependencies": {
5050
"atob": "^1.1.2",
51-
"chai": "^1.10.0",
51+
"chai": "^4.1.2",
5252
"conventional-changelog": "~1.1.0",
5353
"cost-of-modules": "^1.0.1",
5454
"eslint": "^4.19.1",
55-
"mocha": "^2.1.0",
55+
"mocha": "^5.2.0",
5656
"nsp": "^2.6.2",
57-
"nyc": "^11.8.0",
57+
"nyc": "^11.9.0",
5858
"sinon": "^6.0.0"
5959
},
6060
"engines": {

test/async_sign.tests.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ describe('signing a token asynchronously', function() {
2020

2121
it('should work with empty options', function (done) {
2222
jwt.sign({abc: 1}, "secret", {}, function (err) {
23-
expect(err).to.be.null();
23+
expect(err).to.be.null;
2424
done();
2525
});
2626
});
2727

2828
it('should work without options object at all', function (done) {
2929
jwt.sign({abc: 1}, "secret", function (err) {
30-
expect(err).to.be.null();
30+
expect(err).to.be.null;
3131
done();
3232
});
3333
});
@@ -53,22 +53,22 @@ describe('signing a token asynchronously', function() {
5353
it('should return error when secret is not a cert for RS256', function(done) {
5454
//this throw an error because the secret is not a cert and RS256 requires a cert.
5555
jwt.sign({ foo: 'bar' }, secret, { algorithm: 'RS256' }, function (err) {
56-
expect(err).to.be.ok();
56+
expect(err).to.be.ok;
5757
done();
5858
});
5959
});
6060

6161
it('should return error on wrong arguments', function(done) {
6262
//this throw an error because the secret is not a cert and RS256 requires a cert.
6363
jwt.sign({ foo: 'bar' }, secret, { notBefore: {} }, function (err) {
64-
expect(err).to.be.ok();
64+
expect(err).to.be.ok;
6565
done();
6666
});
6767
});
6868

6969
it('should return error on wrong arguments (2)', function(done) {
7070
jwt.sign('string', 'secret', {noTimestamp: true}, function (err) {
71-
expect(err).to.be.ok();
71+
expect(err).to.be.ok;
7272
expect(err).to.be.instanceof(Error);
7373
done();
7474
});
@@ -111,7 +111,7 @@ describe('signing a token asynchronously', function() {
111111
it('should return an error if the secret is falsy and algorithm is not set to none: ' + (typeof secret === 'string' ? '(empty string)' : secret), function(done) {
112112
// This is needed since jws will not answer for falsy secrets
113113
jwt.sign('string', secret, {}, function(err, token) {
114-
expect(err).to.be.exist();
114+
expect(err).to.exist;
115115
expect(err.message).to.equal('secretOrPrivateKey must have a value');
116116
expect(token).to.not.exist;
117117
done();

0 commit comments

Comments
 (0)