1.0.6 • Published 7 years ago

karma-mvs-reporter v1.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

karma-mvs-reporter

Logs error and test fails to visual studio Error List window. I've started with karma-vserror-reporter by jovdb. The orginal doesn't work for me so I've wrote own error formatting function.

How does it look like?

Error List: screenshot

Installation

First install and configure karma, then install the karma-mvs-reporter

$ npm install karma-mvs-reporter --save-dev
> .npm [<ProjectName>] install karma-mvs-reporter --save-dev

Configuration

configure in karma.conf.js the new reporter:

module.exports = function(config) {
  config.set({
    ...
    reporters: ['mvs'], 
	mvsReporter: {
		baseDir: "./",
		logErrorAs: 'error',
		logFailAs: isTfs ? 'error' : 'warning',
		messageFormat: '{message} [{browser}] ({specSuite} {specDescription})' //defult. '{message} [{browser}]'
	}
    ...
    });
  };

run the tests eq. from gulp gulp.file.js :

gulp.task("tests", function (done) {
	var karma = require('karma').Server;
	karma.start({
		configFile: __dirname + '/karma.conf.js',
		singleRun: true
	}, function (karmaResult) {
		done();
	});
});
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

7 years ago