Fixed empty array assertion in getAllWords test