[wp-trac] [WordPress Trac] #25096: Automate running JavaScript unit tests with Grunt

WordPress Trac noreply at wordpress.org
Tue Aug 20 19:42:30 UTC 2013


#25096: Automate running JavaScript unit tests with Grunt
-------------------------+------------------------------
 Reporter:  kadamwhite   |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Unit Tests   |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by kadamwhite):

 Uploaded another patch to add in the `grunt-contrib-connect` task, which
 can be used to start a local webserver so developers can load the tests in
 a web browser. After talking with jorbin we don't automatically open up a
 web browser, in order to give the developer the flexibility to run from
 the command line or not, but these are now the tasks available:

 * `grunt test`: Run all available QUnit specs on the command line, and
 exit
 * `grunt watch:test`: Run all available QUnit specs on the command line,
 and re-run specs whenever any HTML or JS files within /tests/qunit change
 * `grunt test:debug`: Start a local webserver at http://localhost:8000/,
 then start `watch:test`:If you visit http://localhost:8000/tests/qunit/
 and activate LiveReload //e.g.// with a browser extension, the browser
 will auto-refresh the tests page whenever test files change.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25096#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list