如何在grunt-shell-spawn中看到命令输出?

时间:2016-05-02 15:40:26

标签: javascript gruntjs grunt-shell

我正在使用grunt shell spawn来运行jasmine测试。我知道这不是在我的代码上运行测试的理想方式。在尝试了其他grunt插件失败之后,我已经确定这种方法更好,因为我的项目结构和围绕它设置的所有配置。

基本上在我的项目中,当我运行jasmine时,我会在控制台上看到这样的结果

enter image description here

我为test设置了我的grunt shell任务

'test' : {

        'command' : 'jasmine',

        'options' : {

          'async' : true

        }
 }

因此,当我运行grunt test时,我看到与上面相同的输出。相反,我看到了这个

enter image description here

上面的图片没有告诉我有多少测试通过或失败。它只是告诉我命令已成功执行。

我应该在test的{​​{1}}任务中添加哪些选项,以便输出看起来像第一张图片而不是第二张图片?

1 个答案:

答案 0 :(得分:0)

我通过使用start命令生成一个新窗口来颠覆我的问题。

'test' : {

    'command' : 'start jasmine',

    'options' : {

      'async' : true

    }
}