Browse Source

[converter] Added request converted response

master
Muthu Kumar 6 years ago
parent
commit
998bbc4bce
  1. 2
      package.json
  2. 4
      src/gunner.js
  3. 3
      src/reporters/default.js

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "@klenty/gunner", "name": "@klenty/gunner",
"version": "0.10.0", "version": "0.10.2",
"description": "Zero magic, fast test-runner and assertion framework. No magic globals.", "description": "Zero magic, fast test-runner and assertion framework. No magic globals.",
"main": "es6/index.js", "main": "es6/index.js",
"repository": { "repository": {

4
src/gunner.js

@ -96,7 +96,9 @@ class Gunner {
emitter.emit('test end', results); emitter.emit('test end', results);
emitter.emit('end', results); emitter.emit('end', results);
return results; return (options.request
? reporters[options.request].convert(results)
: results);
}); });
} }

3
src/reporters/default.js

@ -6,6 +6,8 @@ const statusMap = {
}; };
const convert = x => x;
const Default = (runner, options) => { const Default = (runner, options) => {
runner.on('start', () => console.log('Started tests')); runner.on('start', () => console.log('Started tests'));
@ -40,3 +42,4 @@ const Default = (runner, options) => {
}; };
module.exports = Default; module.exports = Default;
module.exports.convert = convert;

Loading…
Cancel
Save