diff --git a/docs/development/best-practices.md b/docs/development/best-practices.md index e92fae7159d0b2..920df9c81f75cf 100644 --- a/docs/development/best-practices.md +++ b/docs/development/best-practices.md @@ -143,6 +143,8 @@ Use `UTC` to be time zone independent. - huge strings like the Renovate PR body text - huge complex objects where you only need to test parts - Avoid exporting functions purely for the purpose of testing unless you really need to +- Avoid cast or prefer `x as T` instead of `x` cast + - Use `partial()` from `test/util` If only a partial object is required, ### Fixtures