sindresorhus/gulp-jasmine

Jasmine test browserified code

Open

#6 创建于 2014年2月4日

在 GitHub 查看
 (14 评论) (0 反应) (0 负责人)JavaScript (40 fork)user submission
enhancementhelp wanted

仓库指标

Star
 (112 star)
PR 合并指标
 (30 天内没有已合并 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)
  )

贡献者指南