Ad
  • Custom User Avatar

    for JavaScript doesn't work for any response of the function except for throwing errors for test case:
    Test.expectError("Incorrect hex-string length", function(){getReversedColor("1234567")});

    returning false, returning nothing, NaN, undefined, 0 etc. still causes test error.
    Throwing errors is not considered a common practice in JavaScript, so I strongly suggest either change the ourcome expectation for invalid inputs, or mention this in the description clearly.
    As for now description only includes Java and Haskell:
    "If the entered string is incorrect: length is 7+, has non-hexadecimal characters or non-string type, then the Error(IllegalArgumentException - Java) should be raised/thrown or Nothing should be returned in Haskell."