The function is supposed to find differences in two DNA strands, so I think it should throw an error if we don't have a valid DNA strand.
{
"description": "disallow invalid dna strands",
"property": "distance",
"input": {
"strand1": "ATA",
"strand2": "AUA"
},
"expected": {
"error": "both strands must be valid"
}
}
We had this kind of test in earlier versions, but then we decided to remove it, as some languages have a type system that can avoid such faulty input.
Tracks that miss such a powerful typesystem should implement tests that do error handling in an idiomatic way.
Most helpful comment
We had this kind of test in earlier versions, but then we decided to remove it, as some languages have a type system that can avoid such faulty input.
Tracks that miss such a powerful typesystem should implement tests that do error handling in an idiomatic way.