Skip to content

Commit

Permalink
Much cleaner testing and publishing to coveralls.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Sep 29, 2013
1 parent 6c6dcf9 commit 1e23b82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Gruntfile.js
Expand Up @@ -180,6 +180,12 @@ module.exports = function(grunt) {
singleRun: true
}
}
},

coveralls: {
options: {
coverage_dir: "test/coverage/PhantomJS 1.9.2 (Linux)/"

This comment has been minimized.

Copy link
@SBoudrias

SBoudrias Sep 29, 2013

Contributor

This won't work on Mac and Windows. Anyway to make this dynamic or OS independent?

This comment has been minimized.

Copy link
@tbranyen

tbranyen Sep 29, 2013

Author Owner

It's written for Travis CI which is always Linux. I would love to figure out a cross platform way to get the coverage tests tho.

This comment has been minimized.

Copy link
@SBoudrias

SBoudrias Sep 29, 2013

Contributor

Yeah, I know, but it throws an error when running the tests on OSx (and probably on windows), so that may feel weird to new users.

This comment has been minimized.

Copy link
@tbranyen

tbranyen Sep 29, 2013

Author Owner

Agreed, I just pushed up a change so it'll only run during npm test.

}
}
});

Expand All @@ -192,13 +198,17 @@ module.exports = function(grunt) {

// Third-party tasks.
grunt.loadNpmTasks("grunt-karma");
grunt.loadNpmTasks("grunt-karma-coveralls");
grunt.loadNpmTasks("grunt-processhtml");

// Grunt BBB tasks.
grunt.loadNpmTasks("grunt-bbb-server");
grunt.loadNpmTasks("grunt-bbb-requirejs");
grunt.loadNpmTasks("grunt-bbb-styles");

// Create an aliased test task.
grunt.registerTask("test", ["karma:run", "coveralls"]);

// When running the default Grunt command, just lint the code.
grunt.registerTask("default", [
"clean",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -12,6 +12,7 @@
"grunt-contrib-compress": "~0.5.2",
"grunt-processhtml": "~0.2.0",
"grunt-karma": "~0.6.2",
"grunt-karma-coveralls": "~2.0.2",
"karma-jasmine": "~0.1.0",
"karma-mocha": "~0.1.0",
"karma-qunit": "~0.1.0",
Expand All @@ -27,7 +28,7 @@
},

"scripts": {
"test": "grunt karma:run && cat test/coverage/PhantomJS\\ 1.9.2\\ \\(Linux\\)/lcov.info | coveralls",
"test": "grunt test",
"postinstall": "bower install -s"
}
}

0 comments on commit 1e23b82

Please sign in to comment.