Skip to content

Commit 2d6e56b

Browse files
committed
add open unit test task
1 parent 4257597 commit 2d6e56b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

build/grunt-tasks/open.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Open unit tests in real browser.
3+
*/
4+
5+
module.exports = function (grunt) {
6+
grunt.registerTask('open', function () {
7+
var path = require('path')
8+
var exec = require('child_process').exec
9+
exec('open ' + path.resolve(__dirname, '../../test/unit/runner.html'))
10+
})
11+
}

gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ module.exports = function (grunt) {
8181
require('./build/grunt-tasks/casper')(grunt)
8282
require('./build/grunt-tasks/codecov')(grunt)
8383
require('./build/grunt-tasks/release')(grunt)
84+
require('./build/grunt-tasks/open')(grunt)
8485

8586
// register composite tasks
8687
grunt.registerTask('unit', ['karma:browsers'])

0 commit comments

Comments
 (0)