Skip to content

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

Closed
wants to merge 3 commits into from
Closed

replaced assertion library should.js with chai.js #24

wants to merge 3 commits into from

Conversation

@jankapunkt
Copy link
Member

Did you created the branch from master? I ask because there is a merge conflict. Can you please see if merging develoment into your branch fixes it?

@jwerre
Copy link
Contributor Author

jwerre commented Oct 11, 2021

Ooops! yes, I made the PR from master. This latest should fix it.

Copy link
Member

@jankapunkt jankapunkt left a 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",
Copy link
Member

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.

Copy link
Member

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);
Copy link
Member

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);
Copy link
Member

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


this.obj.should.match(/^[a-f0-9]{40}$/i);
}, true);
utils.addMethod(chai.Assertion.prototype, 'sha1', function (str) {
Copy link
Member

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();
Copy link
Member

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.

@jankapunkt jankapunkt linked an issue Oct 11, 2021 that may be closed by this pull request
@jwerre
Copy link
Contributor Author

jwerre commented Oct 11, 2021

I'm going to close this and work from a chai branch on this repository.

@jwerre jwerre closed this Oct 11, 2021
@jankapunkt
Copy link
Member

Yes you will have a much better git experience than dealing with two remotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Quality
2 participants