Skip to content

Commit

Permalink
Force testem to rerun tests after any files in tmp/result are changed.
Browse files Browse the repository at this point in the history
Fixes issue 392
  • Loading branch information
Eric Berry committed Jan 20, 2014
1 parent 98ec078 commit 8683024
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ module.exports = function(grunt) {
grunt.registerTask('test:browsers', "Run your app's tests in multiple browsers (see tasks/options/testem.js for configuration).", [
'clean:debug', 'build:debug', 'testem:ci:browsers' ]);

grunt.registerTask('test:server', "Alias to `testem:run:basic`. Be sure to install testem first using `npm install -g testem`", [
'testem:run:basic' ]);

// Worker tasks
// =================================

Expand Down
6 changes: 6 additions & 0 deletions tasks/options/testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = {
'/assets/templates.js': 'tmp/result/assets/templates.js',
'/assets/app.css': 'tmp/result/assets/app.css'
},
src_files: [
'tmp/result/**/*.js'
],
launch_in_dev: ['PhantomJS', 'Chrome'],
launch_in_ci: ['PhantomJS', 'Chrome'],
}
Expand All @@ -28,6 +31,9 @@ module.exports = {
'/assets/templates.js': 'tmp/result/assets/templates.js',
'/assets/app.css': 'tmp/result/assets/app.css'
},
src_files: [
'tmp/result/**/*.js'
],
launch_in_dev: ['PhantomJS',
'Chrome',
'ChromeCanary',
Expand Down
15 changes: 9 additions & 6 deletions testem.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"framework": "qunit",
"test_page": "tmp/result/tests/index.html",
"routes": {
"/tests/tests.js": "tmp/result/tests/tests.js",
"/assets/app.js": "tmp/result/assets/app.js",
"/assets/templates.js": "tmp/result/assets/templates.js",
"/assets/app.css": "tmp/result/assets/app.css"
},
"/tests/tests.js": "tmp/result/tests/tests.js",
"/assets/app.js": "tmp/result/assets/app.js",
"/assets/templates.js": "tmp/result/assets/templates.js",
"/assets/app.css": "tmp/result/assets/app.css"
},
"src_files": [
"tmp/result/**/*.js"
],
"launch_in_dev": ["PhantomJS", "Chrome"]
}
}

0 comments on commit 8683024

Please sign in to comment.