failing task on unspecified phantom error, closes #64

This commit is contained in:
Jarrod Overson 2013-06-15 12:08:34 -07:00
parent e622be01c6
commit e157b822bf
4 changed files with 23 additions and 1 deletions

View File

@ -62,6 +62,13 @@ module.exports = function(grunt) {
vendor: 'http://code.jquery.com/jquery-1.10.1.min.js' vendor: 'http://code.jquery.com/jquery-1.10.1.min.js'
} }
}, },
// @todo: automate fail case here
// syntaxError: {
// src: 'test/fixtures/syntaxError/src/**/*.js',
// options: {
// specs: 'test/fixtures/syntaxError/spec/**/*.js'
// }
// },
customTemplate: { customTemplate: {
src: 'test/fixtures/pivotal/src/**/*.js', src: 'test/fixtures/pivotal/src/**/*.js',
options: { options: {

View File

@ -140,7 +140,8 @@ module.exports = function(grunt) {
grunt.log.error(message.red); grunt.log.error(message.red);
}); });
} else { } else {
grunt.log.error(string.red); grunt.log.error("Error caught from phantom. More info can be found by opening the Spec Runner in a browser.");
grunt.warn(string);
} }
}); });

View File

@ -0,0 +1,7 @@
describe("syntax error test specs", function() {
it("specs should pass but task should fail", function() {
expect(true).toBeTruthy();
});
});

7
test/fixtures/syntaxError/src/test.js vendored Normal file
View File

@ -0,0 +1,7 @@
// arbitrary broken JavaScriptt
arostien:*&SRT)(*LIRSETN:R*ST&)(R*ST&J(*RSTL));
window.foo = true;