Skip to content

Commit

Permalink
add testem
Browse files Browse the repository at this point in the history
  • Loading branch information
mohayonao committed Mar 23, 2014
1 parent b9ab5c5 commit 2715362
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ node_js:
- 0.10
before_script:
- npm install -g grunt-cli

script:
- npm run-script travis
notifications:
webhooks:
urls:
Expand Down
12 changes: 12 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,18 @@ module.exports = function(grunt) {
grunt.task.run("test::list:lcovonly");
});

grunt.registerTask("testem", function() {
var done = this.async();
var child = grunt.util.spawn({
cmd: "testem",
args: [ "ci", "--launch", "Chrome,Safari,Firefox,Opera" ]
}, function() {
done();
});
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
});

function sortModules(root) {
var result = [];

Expand Down
1 change: 1 addition & 0 deletions assets/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<script src="../../../assets/sinon-1.9.0.js"></script>
<script src="../../../assets/sinon-chai.js"></script>
<script src="../../../build/scscript.js"></script>
<script src="/testem.js"></script>
<script>
window.require = function() {
};
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"grunt-plato": "~1.0.0"
},
"scripts": {
"test": "grunt travis --verbose && cat ./docs/report/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
"test": "grunt test testem",
"travis": "grunt travis --verbose && cat ./docs/report/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
}
}
3 changes: 3 additions & 0 deletions testem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"test_page": "docs/report/test/index.html"
}

0 comments on commit 2715362

Please sign in to comment.