我正在尝试循环 mocha 测试套件(我想针对无数具有预期结果的值测试我的系统),但我无法让它工作。例如:
规格/example_spec.coffee:
test_values = ["one", "two", "three"]
for value in test_values
describe "TestSuite", ->
it "does some test", ->
console.log value
true.should.be.ok
问题是我的控制台日志输出如下所示:
three
three
three
我希望它看起来像这样:
one
two
three
如何为我的 mocha 测试循环这些值?