first let me start mentioning unit tests works using gulp.
i'm trying run unit tests via webstorm (v10) problem the karam.conf.js pointing compiled js files, , not original files... there way tell webstorm compile files first before runs tests?
here karam.conf.js: (please note pre-compiled files @ same location looks *.spec.js)
module.exports = function (config) { 'use strict'; config.set({ basepath: '', frameworks: ['mocha'], files: [ 'bundledtests/test/**/*.spec.bundle.js' ], // reporters configuration reporters: ['mocha'], plugins: [ 'karma-mocha-reporter', 'karma-mocha', 'karma-phantomjs-launcher', 'karma-chrome-launcher' ], //reporters: ['progress'], port: 9876, colors: true, autowatch: true, singlerun: false, usepolling: true, atomic_save: false, // level of logging // possible values: config.log_disable || config.log_error || config.log_warn || config.log_info || config.log_debug loglevel: config.log_info, browsers: ["chrome"] //'phantomjs', }); }; any appreciated!
add preprocessors section karma.conf.js:
preprocessors: { 'src/**/*.js': ['babel'], 'test/**/*.js': ['babel'] }, mark paths need processed before running in tests.
Comments
Post a Comment