Auth0 rules: test coverage is always zero

Intent: Get test coverage for tests run on Auth0 rules

When we run unit tests with jest yarn test --coverage:

  • zero results for coverage on rules as per best practices
  • the coverage for hooks & other scripts comes up as intended
  • this is a jest bug

some of the things that we tried without success:

this is not an Auth0 bug or limitation - has anyone faced this? what worked for you?

Thanks

Hey there!

As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!