Mock-jwks issue with claims/array

Hello to all the auth0’ers out there. I’m relatively new as a user, but have led largescale projects previously which have consumed AUTH0, and I love the developer experience as much as I’ve enjoyed the end user experience in the past.

I’m just noting this here incase anybody has come across the same issue when unit testing and using mock-jwks. It appears to be not possible to have arrays of roles or permissions, when there is more than one element in either array. As soon as there are multiple elements, say many roles, the payload is stringified as opposed to being preserved as an object.

You can see my findings below.

In case this doesn’t get resolved, can anybody recommend an alternative?