Added tests for the doAttackLoop Attack function