Skip to content

Commit f2b6b25

Browse files
committed
Enable livereload for test suite when opened in the browser via grunt task
1 parent 1f14c00 commit f2b6b25

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Start a test server from the project root:
4141

4242
$ grunt connect:tests
4343

44-
This will automatically open the tests at http://127.0.0.1:9998/test/index.html in the default browser.
44+
This will automatically open the tests at http://127.0.0.1:9998/test/index.html in the default browser, with livereload enabled.
4545

4646
_Note: we recommend cleaning all the browser cookies before running the tests, that can avoid false positive failures._
4747

‎Gruntfile.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ module.exports = function (grunt) {
2929
}
3030
},
3131
watch: {
32+
options: {
33+
livereload: true
34+
},
3235
files: [
3336
'jquery.cookie.js',
3437
'test/tests.js'
@@ -62,9 +65,10 @@ module.exports = function (grunt) {
6265
},
6366
tests: {
6467
options: {
68+
port: 9998,
6569
open: 'http://127.0.0.1:9998/test/index.html',
6670
keepalive: true,
67-
port: 9998
71+
livereload: true
6872
}
6973
}
7074
},

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"grunt-contrib-jshint": "~0.4.0",
2323
"grunt-contrib-uglify": "~0.2.0",
2424
"grunt-contrib-qunit": "~0.2.0",
25-
"grunt-contrib-watch": "~0.3.0",
25+
"grunt-contrib-watch": "~0.6.1",
2626
"grunt-compare-size": "~0.4.0",
2727
"grunt-saucelabs": "~4.1.1",
2828
"grunt-contrib-connect": "~0.7.1",

0 commit comments

Comments
 (0)