TDD with reactjs, reactify, babelify, browserify, gulp -


i looking running test on project use :

  • browserify with these transform :
    • babelify
    • reactify

i did try combo jsdom + mocha testing component has not been builded yet fail on require call component :

> mocha --compilers js:babel/register --recursive  module.js:338     throw err;     ^ error: cannot find module 'system/services/authservice' 

i think need run mocha test during gulp build watchify , build tasks. not sure if handling test during build process option.

normaly, after successful build have file in client/build/js/bundle.js in es5.

i want able test component using es6 file require browserify being readble testing lib.

does provide me option, npm modules or me achieve tdd in environment ?

maybe mochify fit use case. here's react example: https://github.com/mantoni/mochify.js/wiki/testing-a-reactjs-component-with-mochify


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -