mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Enable code coverage
Former-commit-id: 9b52247b6e880f15895842e4ff34c15fc99fd1eb
This commit is contained in:
63
Gruntfile.js
Normal file
63
Gruntfile.js
Normal file
@@ -0,0 +1,63 @@
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
'shell': {
|
||||
'options': {
|
||||
'stdout': true,
|
||||
'stderr': true,
|
||||
'failOnError': true,
|
||||
'execOptions': {
|
||||
'cwd': 'test'
|
||||
}
|
||||
},
|
||||
'cover': {
|
||||
'command': 'istanbul cover --report "html" --verbose --dir "coverage" "test.js"'
|
||||
},
|
||||
'test-rhino': {
|
||||
'command': 'echo "Testing in Rhino..."; rhino -opt -1 "test.js" "../dist/lodash.compat.js"; rhino -opt -1 "test.js" "../dist/lodash.compat.min.js"'
|
||||
},
|
||||
'test-rhino-require': {
|
||||
'command': 'echo "Testing in Rhino with -require..."; rhino -opt -1 -require "test.js" "../dist/lodash.compat.js"; rhino -opt -1 -require "test.js" "../dist/lodash.compat.min.js";'
|
||||
},
|
||||
'test-ringo': {
|
||||
'command': 'echo "Testing in Ringo..."; ringo -o -1 "test.js" "../dist/lodash.compat.js"; ringo -o -1 "test.js" "../dist/lodash.compat.min.js"'
|
||||
},
|
||||
'test-phantomjs': {
|
||||
'command': 'echo "Testing in PhantomJS..."; phantomjs "test.js" "../dist/lodash.compat.js"; phantomjs "test.js" "../dist/lodash.compat.min.js"'
|
||||
},
|
||||
'test-narwhal': {
|
||||
'command': 'echo "Testing in Narwhal..."; export NARWHAL_OPTIMIZATION=-1; narwhal "test.js" "../dist/lodash.compat.js"; narwhal "test.js" "../dist/lodash.compat.min.js"'
|
||||
},
|
||||
'test-node': {
|
||||
'command': 'echo "Testing in Node..."; node "test.js" "../dist/lodash.compat.js"; node "test.js" "../dist/lodash.compat.min.js"'
|
||||
},
|
||||
'test-node-build': {
|
||||
'command': 'echo "Testing build..."; node "test-build.js"'
|
||||
},
|
||||
'test-browser': {
|
||||
'command': 'echo "Testing in a browser..."; open "index.html"'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-shell');
|
||||
|
||||
grunt.registerTask('cover', 'shell:cover');
|
||||
grunt.registerTask('test', [
|
||||
'shell:test-rhino',
|
||||
//'shell:test-rhino-require',
|
||||
'shell:test-ringo',
|
||||
'shell:test-phantomjs',
|
||||
'shell:test-narwhal',
|
||||
'shell:test-node',
|
||||
'shell:test-node-build',
|
||||
'shell:test-browser'
|
||||
]);
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'shell:test-node',
|
||||
'shell:test-node-build',
|
||||
'cover'
|
||||
]);
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user