2015년 1월 6일 화요일

[AngularJS] Protractor + Mocha + ES6

Hi, I'm trying to setup Protractor to run Mocha tests using ES6. To achieve this I'm using mocha-traceur as a compiler that will transpile the tests on the fly before running them.
If I use npm to run "mocha --compilers js:mocha-traceur" the tests run fine but once I try to configure protractor to use the same compilers argument if fails. 

My protractor-conf.js is something like this
{
     
    specs: ['src/**/*.js' ],
    framework: 'mocha',
    mochaOptions:{
       reporter:'spec',
       compilers: 'js:mocha-traceur path/to/tests/'
    }
}

I've also tried running 
{
    specs: ['src/**/*.js' ],    
    framework: 'mocha',
    mochaOptions:{
       reporter:'spec',
       compilers: 'js:mocha-traceur'
    }
}
since specs are already defined but no luck.

So my question is, is there any way to run any ES6 tests with protractor, whenever it's jasmine/mocha/cucumber ?


댓글 없음:

댓글 쓰기