如果有办法获得关于grunt量角器失败的咆哮通知?

时间:2014-10-15 04:12:58

标签: macos gruntjs protractor growl

我在OSX上,并且有一个带有jshint& amp;的grunt监视文件量角器测试。我从jshint消息中收到咆哮通知,但没有来自量角器故障。我宁愿得到一个可见的弹出通知,而不是必须检查终端输出。

有什么建议吗?

使用的包是:

grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-http-server' );
grunt.loadNpmTasks( 'grunt-protractor-webdriver' );
grunt.loadNpmTasks( 'grunt-protractor-runner' );
grunt.loadNpmTasks( 'grunt-notify' );

grunt.task.run( 'http-server:test' );
grunt.task.run( 'protractor_webdriver:test' );
grunt.task.run( 'notify_hooks' );

2 个答案:

答案 0 :(得分:0)

这可以通过一些小的设置来实现。您需要在protractor setup中启用咆哮。

mochaOpts: {
  reporter: "spec",
  slow: 3000,
  growl: true
}

并确保growl is enabled in your setup

答案 1 :(得分:0)

这个

有一个插件
npm install --save-dev protractor-notify-plugin

您可以在插件部分

中添加protractor.conf.js文件
plugins: [{
    package: 'protractor-notify-plugin',
    notifier: 'growl'
}]

也许在这里查看https://github.com/el-davo/protractor-notify-plugin