Esempio n. 1
0
gulp.task('lint', function () {
	// Note: To have the process exit with an error code (1) on
	//  lint error, return the stream and pipe to failOnError last.
	return gulp.src(['./app/js/**/*.js'])
		.pipe(jshint())
		.pipe(jshint.reporter('default'))
		.pipe(jshint.reporter('fail'));
});
Esempio n. 2
0
 it('reports the error correctly', function () {
   sinon.stub(console, 'log');
   reporter(error);
   var expected = '\n'+
     '\u001b[4m.' + '/test/fixtures/example.raml' +
     '\u001b[24m' +
     '\n' +
     '\u001b[33m' + 'Error while parsing a block mapping. line: 25, col: 14' +
     '\u001b[39m' +
     '\n' +
     '  \u001b[90m' + 'line 34' +
     '\u001b[39m  \u001b[90m' + 'col 14' +
     '\u001b[39m  \u001b[34m' + 'expected <block end>, but found }' +
     '\u001b[39m' +
     '\n';
   expect(console.log).calledWith(expected);
   console.log.restore();
 });