Javascript 重复使用Dalek.js编写的测试

Javascript 重复使用Dalek.js编写的测试,javascript,node.js,ui-testing,Javascript,Node.js,Ui Testing,我开发了一些UI测试(使用Phantom.js配置运行) 例如,测试本身非常简单(请参见下面的一些示例代码): 浏览页面-确认预期的标题是否正确 单击按钮/项目从列表中选择项目-确认已选择正确的项目 module.exports = { 'NodeCeller home page': function (test) { test .open('http://localhost:3000') .assert.title().is('Node Cella

我开发了一些UI测试(使用Phantom.js配置运行)

例如,测试本身非常简单(请参见下面的一些示例代码):

  • 浏览页面-确认预期的标题是否正确
  • 单击按钮/项目从列表中选择项目-确认已选择正确的项目

    module.exports = {
       'NodeCeller home page': function (test) {
         test
           .open('http://localhost:3000')
           .assert.title().is('Node Cellar', 'Node Cellar is now open')
           .done();
     },
    
     'NodeCeller Start Browsing Click': function (test) {
         test
        .click('a[href="#wines"]')
        .assert.url('http://localhost:3000/#wines', 'Showing wines selection')
        .done();
      },
    
      'NodeCellar Browse First Wine': function (test) {
         test
            .click('#content > div > ul > li > a')
            .assert.text('legend','Wine Details', 'Showing Wines Details')
            .done();
      },
    };
    
我的问题是,我想在一个循环中多次运行同一组测试。 我已经在谷歌上搜索了Dalek.JS的帮助和示例,但是我找不到任何关于如何实现这一点的示例或文章

任何帮助都将不胜感激