Comments (6)
I am not sure if it's a problem with the reporter, because it is registered as reporter
'reporter:mocha'
It seems more like the testing framework mocha is missing. (karma-mocha)
Can you please share your complete config for further investigations.
from karma-mocha-reporter.
Here you go (and karma-mocha is installed). It all works fine so long as I dont reference it in the plugin. Also included a screenshot of installed modules
// karma.conf.js
// Created: 5/9/2016 1:07 PM
// =============================================================================
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha','sinon','chai-things','chai'],
// list of files / patterns to load in the browser
files: [
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'dist/bundle.js',
'src/**/*.spec.js',
'dist/_index.html',
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'src/**/*.html': ['ng-html2js'],
'src/**/!(*.mock|*.spec).js': ['coverage']
},
ngHtml2JsPreprocessor: {
// strip this from the file path
stripPrefix: 'src/',
// create a single module that contains templates from all the files
moduleName: 'templates'
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha','coverage'],
superDotsReporter: {
icon: {
success : ' ✔ ',
failure : ' ✖ ',
ignore : ' ℹ '
}
},
coverageReporter: {
type : 'html',
dir : 'coverage/'
},
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
from karma-mocha-reporter.
Could it be that your plugins section looks like this:
plugins: [
'karma-mocha-reporter'
]
If so, karma only loads the reporter plugin but not the others, so karma-mocha is not loaded. So either you remove the plugin section from the config and karma takes care of loading all plugins. Or if you specify the plugins section, you have to enter all plugin names.
from karma-mocha-reporter.
Yep, that seemed to be the issue. Just had to specifically list all the plugins and all worked.
But, the reporter doesnt look much different than the existing mocha reporter karma-mocha
?
from karma-mocha-reporter.
I am not aware that karma-mocha
ships it's own reporter. I thought it's only the test framework and the default karma reporter is used.
from karma-mocha-reporter.
@4kochi yes, you are indeed correct. My bad ;-)
from karma-mocha-reporter.
Related Issues (20)
- Enhance symbols fallback for windows HOT 2
- Broken on Windows 10 HOT 3
- Console.log written to console twice HOT 3
- Order of output sections HOT 1
- Install procedure HOT 3
- display test duration HOT 1
- Diff isn't showing for object in array
- colors.info symbol can be used for skipped unit tests
- npm audit ansi-regex HOT 11
- I only see describes, no its. HOT 2
- Skipped tests listed in failed tests. HOT 5
- concurrent runs screw up log report HOT 6
- Browser specific tests won't be reported HOT 8
- Multiple describes with same name not grouped correctly
- Incorrect formatting inside Travis CI?? HOT 5
- Support for different failure messages for the same test case HOT 2
- Cannot show file path on error test HOT 5
- Support tests with reserved prototype names HOT 1
- It doesn't working with angular-cli HOT 4
- Error sources occasionally being dropped from karma-mocha-reporter summary HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-mocha-reporter.