Skip to content
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

fix(tests): fix failing unit test for request query #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bhavya3024
Copy link

@bhavya3024 bhavya3024 commented Feb 25, 2024

I have fixed the unit test which were failing. It should have worked with objects but not working fine as expected but worked using JSON.stringify.
Also did some indentations in package.json and the test file

Feel free to suggest anything!

@asalant @busterbenson @dpup @majelbstoat

@@ -71,20 +71,20 @@ describe('MediumClient - methods', function () {
authUrl.protocol.should.equal('https:')
authUrl.hostname.should.equal('medium.com')
authUrl.pathname.should.equal('/m/oauth/authorize')
authUrl.query.should.deepEqual({
should.equal(JSON.stringify(authUrl.query), JSON.stringify({
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where I changed, others are indentation fixes, deepEqual not working with objects, don't know, are they checking the reference as well. So I had to do JSON.stringify!

"should": "^13.2.3"
},
"scripts": {
"test": "mocha"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a npm command so anyone can run npm run test

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.

None yet

1 participant