Skip to content

Commit 71f755d

Browse files
committed
Feat(config): Added config for output file name.
1 parent d0fc577 commit 71f755d

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,17 @@ A quick an dirty karma reporter that integrates with bamboo via https://marketpl
66
Install
77
------------
88
`npm install karma-atlassian-bamboo-reporter`
9+
10+
Usage
11+
------------
12+
```
13+
...
14+
15+
reporters: ['progress', 'bamboo'],
16+
17+
bambooReporter:{
18+
filename: 'util.mocha.json' //optional, defaults to "mocha.json"
19+
},
20+
21+
...
22+
```

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
var os = require('os')
2-
, path = require('path')
3-
, fs = require('fs')
4-
, filename = 'mocha.json'; // because the bamboo plugin looks here....
1+
var fs = require('fs')
2+
, filename = 'mocha.json';
53

64

7-
var bambooReporter = function (baseReporterDecorator) {
5+
var bambooReporter = function (baseReporterDecorator, config) {
86
baseReporterDecorator(this);
9-
7+
8+
filename = config && config.filename || filename;
9+
1010
var results = {
1111
time: 0, tests: [], failures: [], passes: [], skips: []
1212
};
@@ -49,7 +49,7 @@ function clean(test) {
4949
return o;
5050
}
5151

52-
bambooReporter.$inject = ['baseReporterDecorator'];
52+
bambooReporter.$inject = ['baseReporterDecorator', 'config.bambooReporter'];
5353

5454
// PUBLISH DI MODULE
5555
module.exports = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "karma-atlassian-bamboo-reporter",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"author": "TheSharpieOne",
55
"license": "MIT",
66
"homepage": "https://github.com/TheSharpieOne/karma-bamboo-reporter",

0 commit comments

Comments
 (0)