-
-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
ready-for-developmentGrab it while you can!Grab it while you can!refactoringbeautiful codebeautiful code
Description
This is my current understanding of the problem. Please provide feedback whether I'm missing something.
We have lots of top-level functions and it's often unclear
- issue1: whether they belong to the functional core (not the imperative shell) and therefore needs to be tested
- issue2: whether they are currently being tested
- issue3: if not, what kind of simple tests we can add as a starting point
For example with the function getArtifactNameToConstantMapping()
- issue1: definitely part of the functional core and we relay on it for multiple features
- issue2: it's not being tested currently. It's used in other tests which is not the same thing.
- issue3: the function works so we should not modify it but simply write what Martin Fowler calls acceptance tests for it. Meaning: if we give her this kind of objects as input, this is the output we currently get.
Regarding issue 2, an issue is that if you have a class FindKitten
, there is a strong convention that you test it in the class FikkndKittenTest
. And you can jump there with the action Go To Test
.
But there is no such convention for top-level functions AFAIK.
Metadata
Metadata
Assignees
Labels
ready-for-developmentGrab it while you can!Grab it while you can!refactoringbeautiful codebeautiful code