2
カルマの設定でsinglerunをtrueに設定していれば、私はここでは何も分かりませんが、テストレポートは表示されません。ブラウザが立ち上げられたのはそれだけです。 DEBUGをクリックしてブラウザのコンソールログを調べることもできますが、端末の結果も確認する必要があります。singlerun = falseのカルマレポートがありません
ありがとうございました!
マイkarma.config.js:上記のコメントから
basePath: '../', // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher browsers: ['PhantomJS'], frameworks: ['mocha', 'chai'], files: [ { pattern: 'test/vendor/indexeddbshim.min.js', watched: false }, { pattern: 'tests.webpack.js', watched: false }, ], preprocessors: { 'tests.webpack.js': ['webpack'], }, webpack: { resolve: { root: [ path.resolve('./test/vendor'), ], alias: { backbone: 'backbone', underscore: 'underscore', }, }, module: { loaders: [ { // test: /^\.js$/, exclude: /(node_modules|bower_components|vendor)/, loader: 'babel-loader', }, ], }, }, webpackServer: { noInfo: true, }, // enable/disable watching file and executing tests whenever any file changes autoWatch: false, // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter reporters: ['progress'], // web server port port: 9876, // enable/disable colors in the output (reporters and logs) colors: true, // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits singleRun: false, plugins: [ require('karma-webpack'), require('karma-mocha'), require('karma-chai'), require('karma-phantomjs-launcher'), require('karma-chrome-launcher'), ], logLevel: config.LOG_INFO, });
:false'のは、明示的に手動でカルマ・クライアントを起動していることを前提としています。つまり、 'karma'(技術的に' karma-server')を起動し、別の端末に移動して 'karma run'と入力することを意味します。カルマコンフィギュレーションで 'singleRun:true'を設定すると'カルマ実行 'が呼び出されます。 doc:http://karma-runner.github.io/0.13/plus/requirejs.html – MarcoL
すばらしい、ありがとう、これは私をたくさん助けました! – Kazlauskis
@MarcoLあなたはこの質問の回答としてあなたのコメントを書き直すべきです。それはまさに私が探していたものでした。 –