Tdd, Typescript, Testing Framework, Software Development, Software Testing.
also provide a bunch of test cases, which are super useful! assert_equal(-1, chop(3, [])) assert_equal(-1, chop(3, [1])) assert_equal(0, chop(1, [1])) # assert_equal(0, chop(1, [1, 3, 5])) assert_equal(1, chop(3, [1, 3, 5])) assert_equal(2, chop(5, [1, 3, 5])) assert_equal(-1, chop(0, [1, 3, 5]))