-
-
Notifications
You must be signed in to change notification settings - Fork 51
replaced assertion library should.js with chai.js #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Did you created the branch from |
Ooops! yes, I made the PR from master. This latest should fix it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@can you please satisfy the jshint lint? I know we will soon move to eslint and/or prettier but for now we still have jslint and weshould keep it satisfied until we moved on. The following lines were affected:
test/assertions.js: line 14, col 63, 'str' is defined but never used.
test/unit/models/token-model_test.js: line 2, col 5, 'should' is defined but never used.
Should not be much to fix them.
"jshint": "2.13.0", | ||
"mocha": "5.2.0", | ||
"nyc": "^15.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove nyc
? It's used for our coverage report. Please add it again in order to prevent follow-up issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwerre somehow nyc
is stil removed, even after pulling development
. Could you please add it again? It's just running npm install --save-dev nyc
@@ -121,8 +121,8 @@ describe('TokenHandler integration', function() { | |||
saveToken: function() {} | |||
}; | |||
var handler = new TokenHandler({ accessTokenLifetime: 120, extendedGrantTypes: extendedGrantTypes, model: model, refreshTokenLifetime: 120 }); | |||
|
|||
handler.grantTypes.should.containEql(extendedGrantTypes); | |||
console.log(handler.grantTypes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove console.log statements from code
@@ -997,8 +997,8 @@ describe('TokenHandler integration', function() { | |||
}; | |||
var handler = new TokenHandler({ accessTokenLifetime: 120, model: model, refreshTokenLifetime: 120 }); | |||
var tokenType = handler.getTokenType({ accessToken: 'foo', refreshToken: 'bar', scope: 'foobar' }); | |||
|
|||
tokenType.should.containEql({ accessToken: 'foo', accessTokenLifetime: undefined, refreshToken: 'bar', scope: 'foobar' }); | |||
console.log(tokenType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the console.log statements from code
test/assertions.js
Outdated
|
||
this.obj.should.match(/^[a-f0-9]{40}$/i); | ||
}, true); | ||
utils.addMethod(chai.Assertion.prototype, 'sha1', function (str) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linter says " 'str' is defined but never used."
@@ -1,5 +1,5 @@ | |||
var TokenModel = require('../../../lib/models/token-model'); | |||
|
|||
var should = require('chai').should(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'should' is defined but never used.
I'm going to close this and work from a |
Yes you will have a much better git experience than dealing with two remotes |
#5 (comment)
The only lines I'd double check here are these:
Here I've replaced
should.containDeep
withchai.deep.include