我的租户中有多个规则,现在我想为我的规则编写单元测试,就像https://github.com/auth0/rules/tree/master/test一样。问题出在文档(https://auth0.com/docs/support/testing)中,我们可以使用{{ 3}}模块用于单元测试我们的规则,但是我认为解释很旧,并且没有更新,因为在示例项目(https://www.npmjs.com/package/auth0-rules-testharness)中,我们需要添加webtask令牌和沙盒url,现在找不到webtask令牌在Auth0信息中心(https://github.com/tawawa/auth0-rules-testharness-sample)中,还可以从哪里获得此沙盒网址?有帮助吗?
答案 0 :(得分:0)
npm软件包似乎有点过时了。以下是一些更新的资源:
单元测试规则
规则最佳做法:https://auth0.com/docs/best-practices/rules 具体来说:https://auth0.com/docs/best-practices/rules#testing
一些示例存储库: https://github.com/auth0-customers/rule-test-example https://github.com/auth0/auth0-rules-local-testharness