return details.failed;
}
- var phantomjs = require('phantomjs-prebuilt').path;
- grunt.registerMultiTask('qunit', function() {
- var done = this.async();
- var errors = [];
-
- function run(testType, binPath, testPath) {
- grunt.util.spawn({
- cmd: binPath,
- args: ['test.js', testPath]
- }, function(error, result) {
- if (error) {
- grunt.log.error(result.stderr);
- grunt.log.error(testType + ' test failed to load');
- errors.push(-1);
- }
- else {
- var output = result.stdout;
- var index = output.lastIndexOf('\n');
- if (index !== -1) {
- // There's something before the report JSON
- // Log it to the console -- it's probably some debug output:
- console.log(output.slice(0, index));
- output = output.slice(index);
- }
- errors.push(report(testType, JSON.parse(output)));
- }
- if (errors.length === 2) {
- done(!errors[0] && !errors[1]);
- }
- });
- }
-
- run('node', process.argv[0], this.data[0]);
- run('web', phantomjs, this.data[1]);
- });
+ //var phantomjs = require('phantomjs-prebuilt').path;
+ //grunt.registerMultiTask('qunit', function() {
+ // var done = this.async();
+ // var errors = [];
+ //
+ // function run(testType, binPath, testPath) {
+ // grunt.util.spawn({
+ // cmd: binPath,
+ // args: ['test.js', testPath]
+ // }, function(error, result) {
+ // if (error) {
+ // grunt.log.error(result.stderr);
+ // grunt.log.error(testType + ' test failed to load');
+ // errors.push(-1);
+ // }
+ // else {
+ // var output = result.stdout;
+ // var index = output.lastIndexOf('\n');
+ // if (index !== -1) {
+ // // There's something before the report JSON
+ // // Log it to the console -- it's probably some debug output:
+ // console.log(output.slice(0, index));
+ // output = output.slice(index);
+ // }
+ // errors.push(report(testType, JSON.parse(output)));
+ // }
+ // if (errors.length === 2) {
+ // done(!errors[0] && !errors[1]);
+ // }
+ // });
+ // }
+ //
+ // run('node', process.argv[0], this.data[0]);
+ // run('web', phantomjs, this.data[1]);
+ //});
grunt.registerMultiTask('replace', function() {
var pattern = this.data[0];
'uglify'
]);
- grunt.registerTask('test', [
- 'eslint',
- 'dist',
- 'qunit'
- ]);
-
- grunt.registerTask('default', 'test');
+ //grunt.registerTask('test', [
+ // 'eslint',
+ // 'dist',
+ // 'qunit'
+ //]);
+ //
+ //grunt.registerTask('default', 'test');
};