sindresorhus/gulp-jasmine

Jasmine test browserified code

Aperta

#6 aperta il 4 feb 2014

 (14 commenti) (0 reazioni) (0 assegnatari)JavaScript (40 fork)user submission
enhancementhelp wanted

Metriche repository

Star
 (112 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I'm trying to get gulp to build/transform my code with browserify/envify, and then test the transformed code with jasmine.

The browserify works:

gulp.src('./test/*')
  .pipe(browserify({ transform: ['reactify', 'envify'] }))
  .pipe(
    es.map(function (file, callback) {
      console.log(file.contents.toString()) //=> transformed code! :D
    })
  )

However when I pipe it into jasmine, I get failing tests which show code that is not reactified/envified:

gulp.src('./test/*')
  .pipe(browserify({ transform: ['reactify', 'envify'] }))
  .pipe(
    jasmine({ verbose: true }) //=> unexpected <ReactComponent/> (untransformed code)
  )

Guida contributor