Ad
  • Default User Avatar

    Should pass the following tests:

    Test.assertEquals(maskify('4556364607935616'), '############5616');
    Test.assertEquals(maskify('pi'), 'pi', 'pi returns pi');
    Test.assertEquals(maskify('dog'), 'dog', 'dog returns dog');
    Test.assertEquals(maskify('doge'), 'doge', 'doge returns doge');
    Test.assertEquals(maskify('1'), '1', '1 returns 1');

    Also, assertEquals is what you want to use here, not expect.