我正在尝试循环一个mocha测试套件(我想针对无数的值测试我的系统与预期的结果),但我无法让它工作.例如:
spec/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
Run Code Online (Sandbox Code Playgroud)
问题是我的控制台日志输出如下所示:
three
three
three
Run Code Online (Sandbox Code Playgroud)
我希望它看起来像这样:
one
two
three
Run Code Online (Sandbox Code Playgroud)
如何为我的mocha测试循环这些值?