Ad
  • Custom User Avatar

    Users can modify the input in random tests. This line

    expect(reverseList(list), equals(list.reversed.toList()));
    

    should be changed to

    expect(reverseList(List.from(list)), equals(list.reversed.toList()));
    

    I recommend to print all tested arrays: test("sample array [3,1,5,4]") and test("random array $list")

    I also recommend to add return []; to the solution setup.