Refactor task list tests and coffeescript

王权利请求将github/fork/mr-vinn/refactor-tasks合并到master

Created by: mr-vinn

I refactored the Spinach tests and CoffeeScript for task lists to remove the repetition that @cirosantilli pointed out in #7964.

合并请求报告