I try to develop a feedback module with ES6 and no generator can be found for it, A basic one I had to make was able to configure almost everything, but to test my module, many problems try to configure karma.
This is my karma. Config.js
// Karma Configuration // http://karma-runner.github.io/0.12/config/configuration-file .html // Generated on 2015-03-17 at / / Generator-karma 0.9.0 module. Exports = function (config) {'strict use'; Config.set ({// is viewing the enabled / disabled file and executes the test whenever any file changes automatically: correct, // base path, which used to solve files and exclude paths The list of files / patterns to load into '../', // test framework browser files: ['node_module / karma-babel- preprocessor / node_modules / babel-core / browser-polyfill.js',' node_modules / React / react.js', 'lib / ** / * .js',' test / ** / * .js'], preprocessor: {'Lib / ** / * .cjsx': ['cjsx'] , 'Test / ** / * .cjsx': ['CJSA S '', 'bb / ** / * .js': ['babel', 'mamas'], 'test / ** / * .js': ['babel', 'general']}, babel proportioner: {Option: {sourceMap: 'inline'}, file name: function (file) {return file .originalPath.replace (/ .js $ /, '.es5.js');}, sourceFileName: function (file) { Return file.originalPath;}}, // List of files / patterns to be excluded: [], // Web server port port: 8080, // Start these browsers, currently available: // - Chrome // - Chrome Canary // - Firefox // - Opera // - Safar (MAC only) // - FATTOMS S // - IE (Windows only) Browsers: ['Chrome', 'Funtmum S'], // Which plug-ins to enable plugins: ['Karma-General' , 'Karma-jdsx-preprocessor', 'karma-babel-preprocessor', 'karma-phatomaj-launcher', 'karma-chrome-launcher', 'karma-motcha', 'karma-tea'], // continuous integration If the mode is true, then it captures the browsers, runs tests and runs out alone: false, color: true, // no. Bhava Logging // Level: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG logLevel: config.LOG_INFO, // If you are using GRent's server to run the exams, delete the following lines: {// '/': 'http: // localhost: 9000 /' //} , // url root site root // urlRoot: '_karma_'}); };
At this point I have the following error
Chrome 42.0.2311 (Mac OS X 10.10.2) Error Unwanted Reference Reference: Not Defined on Module / Users / Admin / Workspace / Open_source / RAP-Context-Inspector / Anode_Mold / React / Ract.JSIR
And if I remove the Ref from File Riff, then this second error Gets
Funtemum S 1.9.8 (Mac OS X) error is unsolicited Uti: "/ user / admin / workspace / Opan_sors / reaction component inspector / the Lib / Index Module 'response could not be found. .es5.js' / user / admin / workspace / open_source / rap-colon-inspector / anode_module / karma-commonjs / client / commonjs_bridge.js: 85
and if I I can not find the variable: / users / admin / workspace / open_source / react-component-inspector / lib / index
Fontemo 1.9.8 (Mac OS X) error reference error: Es5.js: 5
Or at least anyone can recommend a yo generator with karma, ES6, JSX to create a module, is not a web app ?
Thanks for the help
I believe that you can send the feedback file The path in the list of preprocessor files is required to add. The reason for this is that the response file is also using normal format like files in your app, and when that file is loaded in Chrome, unlike the node, the browser does not know where the "module" object is Came from. Updated excerpt from your code given below:
// File / pattern list to load in browser files: ['node_mod / karma-babel-preprocessor / node_module / babel- Core / Browser-Polyfil .js ',' node_modules / react / react.js ',' lib / ** / *. Js ',' test / ** / *. Js'], preprocessor: {// You possibly can leave the bubble here. '' Node_modules / react / react.js ': [' Babel ',' Normal ',]' lib / ** / * Cjsx ': [' cjsx '],' test / ** / *. Cjsx ': [' CJS '],' BB / ** / *. JS ': [' Babel ',' Common '],' Test / ** / *. JS ': [' Babel ',' Common ']},
No comments:
Post a Comment