This commit is contained in:
oitsjustjose 2017-02-26 17:06:42 -05:00
commit 6b60015c02
9588 changed files with 1149251 additions and 49 deletions

42
node_modules/gulp-print/test/gulp-print.spec.coffee generated vendored Normal file
View file

@ -0,0 +1,42 @@
require 'coffee-errors'
path = require 'path'
chai = require 'chai'
sinon = require 'sinon'
gutil = require 'gulp-util'
# using compiled JavaScript file here to be sure module works
print = require '../lib/gulp-print.js'
expect = chai.expect
chai.use require 'sinon-chai'
describe 'gulp-print', ->
beforeEach ->
sinon.stub print, 'log'
afterEach ->
print.log.restore()
describe 'passing formatting function', ->
it 'logs file path using default formatter', (done) ->
stream = print()
filepath = path.join process.cwd(), 'foo/bar.js'
stream.on 'end', ->
expect(print.log).to.have.been.calledWith gutil.colors.magenta path.relative process.cwd(), filepath
done()
stream.write new gutil.File path: filepath
stream.end()
it 'logs file paths using custom formatter', (done) ->
stream = print (filepath) -> "Hello #{filepath}"
filepath = path.join process.cwd(), 'foo/bar.js'
stream.on 'end', ->
expect(print.log).to.have.been.calledWith "Hello #{gutil.colors.magenta path.relative process.cwd(), filepath}"
done()
stream.write new gutil.File path: filepath
stream.end()

5
node_modules/gulp-print/test/mocha.opts generated vendored Normal file
View file

@ -0,0 +1,5 @@
--compilers coffee:coffee-script/register
--recursive
--reporter spec
--ui bdd
--timeout 1000