Skip to content

Commit

Permalink
add test task, avoid attempt to run tests in unrelated html files
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Aug 24, 2013
1 parent 7f85c21 commit 1c8fd60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function(grunt) {

// Tests will be added soon
qunit: {
files: [ 'test/**/*.html' ]
files: [ 'test/*.html' ]
},

uglify: {
Expand Down Expand Up @@ -130,4 +130,7 @@ module.exports = function(grunt) {
// Serve presentation locally
grunt.registerTask( 'serve', [ 'connect', 'watch' ] );

// Run tests
grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );

};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "http://lab.hakim.se/reveal-js",
"subdomain": "revealjs",
"scripts": {
"test": "grunt jshint qunit",
"test": "grunt test",
"start": ""
},
"author": {
Expand Down
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ Reveal.addEventListener( 'ready', function() {

asyncTest( 'fragmentshown event', function() {
expect( 2 );
start();

var _onEvent = function( event ) {
ok( true, 'event fired' );
Expand All @@ -221,6 +220,8 @@ Reveal.addEventListener( 'ready', function() {
Reveal.next();
Reveal.prev(); // shouldn't fire fragmentshown

start();

Reveal.removeEventListener( 'fragmentshown', _onEvent );
});

Expand Down

0 comments on commit 1c8fd60

Please sign in to comment.