Ad
  • Custom User Avatar

    ( JS )

    Test range ( n < 1 000 ) is waaay too small for 6 kyu.

    ( Reference solution is horribly unoptimised. )

  • Custom User Avatar

    The function is named howManyHappyNumbers, but the expected answer is happyNumbers. Did you change your mind halfway through building this? :P

    The third example test is incorrect. It asks for happy(300) but tests something like happy(270).

    If you use Test.assertDeepEquals instead of Test.assertSimilar, wrap the tests in individual Test.its ( you can still embed n in its text ) and all tests in a Test.describe, you'll have a much cleaner Test result log.