Skip to content

fix(stubs): allow decode method to be stubbed - #876

Merged
jakelacey2012 merged 3 commits into
auth0:masterfrom
jakelacey2012:fix/decode-mock
Apr 3, 2023
Merged

fix(stubs): allow decode method to be stubbed#876
jakelacey2012 merged 3 commits into
auth0:masterfrom
jakelacey2012:fix/decode-mock

Conversation

@jakelacey2012

Copy link
Copy Markdown
Contributor

Description

This PR allows .decode to be stubbed.

References

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@panva

panva commented Jan 11, 2023

Copy link
Copy Markdown
Member

@jakelacey2012 just revert 15a1bc4 to solve #875, #870, and possibly also #876.

@kento-machida

Copy link
Copy Markdown

Revert 15a1bc4 to solve also #866

@macrouch

Copy link
Copy Markdown

Revert 15a1bc4 to solve also #866

This fixes my issue with using

jest.spyOn(jwt, 'decode').mockImplementation(() => { ... })

chimingyip
chimingyip previously approved these changes Feb 7, 2023
@harishsambasivam

Copy link
Copy Markdown

+1

@jakelacey2012
jakelacey2012 requested a review from panva February 13, 2023 10:15
@sunkarabhargava

Copy link
Copy Markdown

@chimingyip @CharlesRea @julienwoll @shane-tomlinson @floresmatias0 @mcastany Can you guys, please help us by merging this PR & release a new version ? many of our projects are in trouble due to this.!

@jakelacey2012
jakelacey2012 merged commit a99fd4b into auth0:master Apr 3, 2023
@ksstoneware

Copy link
Copy Markdown

Glad to see this is merged but we're still blocked until there is a new release. Anyone know how soon that will occur?

@NickHeap2

Copy link
Copy Markdown

+1 for waiting for the new release.

@diegopamio

Copy link
Copy Markdown

Any clue when this will be released?

@mohamedjkr

mohamedjkr commented May 3, 2023

Copy link
Copy Markdown

waiting for the new release 👍

@FoxMessenger

Copy link
Copy Markdown

Are there any updates to this release?

@kuhiga

kuhiga commented Jun 20, 2023

Copy link
Copy Markdown

@jakelacey2012 @ArturKlajnerok Thanks for opening and merging this PR. Are you able to do a release to get this in?

@jakelacey2012

Copy link
Copy Markdown
Contributor Author

Thank you for patience with this issue, this has been release in https://www.npmjs.com/package/jsonwebtoken/v/9.0.1 - thank you.

@lorand-horvath

Copy link
Copy Markdown

Thank you for patience with this issue, this has been release in https://www.npmjs.com/package/jsonwebtoken/v/9.0.1 - thank you.

@jakelacey2012 Could you tag release 9.0.1 please? The latest tag on https://github.com/auth0/node-jsonwebtoken/tags is still 9.0.0 Thanks!

@jakelacey2012

Copy link
Copy Markdown
Contributor Author

@lorand-horvath no problem you can find the tag here https://github.com/auth0/node-jsonwebtoken/tree/v9.0.1

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.