[go: up one dir, main page]

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

Add new convenience token methods #392

Merged
merged 2 commits into from
May 8, 2024
Merged

Add new convenience token methods #392

merged 2 commits into from
May 8, 2024

Conversation

marcospassos
Copy link
Member

Summary

This pull request adds new convenient methods to the Token class to make handling easier.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@marcospassos marcospassos added the enhancement New feature or request label May 8, 2024
Comment on lines 596 to 597
// Ensure this prop is removed
jti: undefined,
Copy link
Member

Choose a reason for hiding this comment

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

There is no logic for this in the method

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch! I was just testing to see if you were paying attention to the review 👀

Did you know that in Jest, the assertion expect({foo: true}).toEqual({foo: true, bar: undefined}) is considered true? It's a bad design decision, but they realized it too late to make a change without breaking existing code. So, they introduced a new assertion called toStrictEqual that behaves as we would expect. It's similar to the difference between === and ==== operators in JavaScript.

Copy link
codeclimate bot commented May 8, 2024

Code Climate has analyzed commit 0d9a095 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 99.9% (0.0% change).

View more on Code Climate.

@marcospassos marcospassos merged commit 20d64f1 into master May 8, 2024
5 checks passed
@marcospassos marcospassos deleted the new-token-methods branch May 8, 2024 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants