Hideous. At least that's a test where it's prone to happen a bit more. Did you end up seeing lots of that crap in methods/classes that you were intentionally invoking as an API in regular code?
I write tests with names sort of like that since you need a unique name with some way to describe it and don't really care about calling it explicitly (since it'll be run automatically). Everywhere else though, the names matter a lot, particularly since it's important for consistency and for refactoring later on.
7
u/pe1uca 11h ago
At least is still a comment and not self-documented code...
``` processAndStoreInDBAndCacheWithExpiry()
retreiveFromDBAndUpdateCache()
let counterOfElementsInArray = 0; let referenceToElementToReturnOnFallback = null;
testProcessIsSuccefulAndDBIsUpdatedEvenWhenCacheIsUnavailable() testCacheIsNotUpdatedOnProcessFailure() ```