Skip to content

Instantly share code, notes, and snippets.

@brantb
Last active August 29, 2015 13:56
Show Gist options
  • Save brantb/8825297 to your computer and use it in GitHub Desktop.
Save brantb/8825297 to your computer and use it in GitHub Desktop.
# npm install gulp gulp-util gulp-mocha mocha coffee-script assert
gulp = require 'gulp'
gutil = require 'gulp-util'
mocha = require 'gulp-mocha'
gulp.task 'test', ->
gulp.src('test.coffee').pipe(mocha()).on('error', gutil.log)
gulp.task 'default', ->
gulp.watch('test.coffee', 'test').on('error', gutil.log)
require('coffee-script/register');
require('./gulpfile.coffee');
assert = require 'assert'
describe 'A test', ->
it 'should not abort gulp.watch() when it fails', ->
value = 'foo'
expected = 'foo' # Change this after running gulp.
assert.equal expected, value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment