You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend general advice to recommend test driven development
And add an "Exceptions" part to the recommendation on imports stating that importing rules directly is fine for tests.
Test section
Use different package name, and imports, for tests
Recommendation for naming test packages: same as the package under test, with either .test or _test appended?
Recommendation for naming test files: _test.rego suffix?
Additionally, I've seen a few questions about how to best organize tests, i.e. should they be in the same directory as packages being tested, or in a separate one? While not strictly about "Rego" the language, I think it makes sense to consider this for the guide as well.
The text was updated successfully, but these errors were encountered:
Some thoughts
Test section
.test
or_test
appended?_test.rego
suffix?Additionally, I've seen a few questions about how to best organize tests, i.e. should they be in the same directory as packages being tested, or in a separate one? While not strictly about "Rego" the language, I think it makes sense to consider this for the guide as well.
The text was updated successfully, but these errors were encountered: