Restore the original JWT module
Reset all mocks to their default state
Access to the mock functions for custom setup
Helper methods for common JWT testing scenarios
Mock a successful token generation
Mock a token generation error
Mock successful token verification with custom payload
Mock token verification for an expired token
Mock token verification for an invalid token
Mock token verification for a malformed token
Mock token decoding success with custom payload
Mock token decoding failure (returns null)
Create a mock token for different user roles
Create an expired token payload
Create a token that will expire soon
Verify that sign was called with specific parameters
Verify that verify was called with specific parameters
Verify that decode was called with specific parameters
Verify that sign was not called
Verify that verify was not called
Verify that decode was not called
Predefined token scenarios for common testing cases
Helper to mock JWT functions for consistent testing Provides comprehensive JWT mocking capabilities for various authentication scenarios