Skip to content

test: add missing algorithm types in jwa.test.ts #4606

@flathill404

Description

@flathill404

The AlgorithmTypes enum in src/utils/jwt/jwa.ts defines several algorithms including PS, ES, and EdDSA. However, the current tests in src/utils/jwt/jwa.test.ts only cover HS and RS algorithms.

expect('HS256' as AlgorithmTypes).toBe(AlgorithmTypes.HS256)
expect('HS384' as AlgorithmTypes).toBe(AlgorithmTypes.HS384)
expect('HS512' as AlgorithmTypes).toBe(AlgorithmTypes.HS512)
expect('RS256' as AlgorithmTypes).toBe(AlgorithmTypes.RS256)
expect('RS384' as AlgorithmTypes).toBe(AlgorithmTypes.RS384)
expect('RS512' as AlgorithmTypes).toBe(AlgorithmTypes.RS512)

I would like to add test cases for the following missing algorithms to ensure the completeness of the tests:

  • PS256, PS384, PS512
  • ES256, ES384, ES512
  • EdDSA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions