sindresorhus/gulp-jasmine

Jasmine test browserified code

オープン

#6 opened on 2014/02/04

 (14 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (40 件のフォーク)user submission
enhancementhelp wanted

Repository metrics

Stars
 (112 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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)
  )

コントリビューターガイド