2014년 12월 29일 월요일

[MochaJs] xunit reporter not working with 2.1.0 release

I'm unable to use the xunit reporter with the 2.1.0. release

It is working properly with 2.0.1

Here is my grunt file:

      mochaTest: {
        dist: {
          options: {
            reporter: 'spec',
            require: 'should',
            quiet: false, // Optionally suppress output to standard out (defaults to false)
            clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
          },
          src: [ 'tests/**/*.js' ]
        },
        jenkins: {
          options: {
            reporter: 'xunit',
            require: 'should',
            captureFile: 'result.xml',
            quiet: false, // Optionally suppress output to standard out (defaults to false)
            clearRequireCache: false // Optionally clear the require cache before running tests (defaults to false)
          },
          src: [ 'tests/**/*.js' ]
        }
      },

---

Here is the jenkins error:

[4mRunning "mochaTest:jenkins" (mochaTest) task [24m
[31m>> [39mMocha exploded!
[31m>> [39mTypeError: Cannot read property 'reporterOptions' of undefined [31m
>> [39m    at new XUnit (/var/lib/jenkins/workspace/development/node_modules/mocha/lib/reporters/xunit.js:39:14) [31m
>> [39m    at MochaWrapper.run (/var/lib/jenkins/workspace/development/node_modules/grunt-mocha-test/tasks/lib/MochaWrapper.js:56:27) [31m
>> [39m    at /var/lib/jenkins/workspace/development/node_modules/grunt-mocha-test/tasks/mocha-test.js:86:20 [31m
>> [39m    at capture (/var/lib/jenkins/workspace/development/node_modules/grunt-mocha-test/tasks/mocha-test.js:33:5) [31m
>> [39m    at Object.<anonymous> (/var/lib/jenkins/workspace/development/node_modules/grunt-mocha-test/tasks/mocha-test.js:81:5) [31m
>> [39m    at Object.<anonymous> (/var/lib/jenkins/workspace/development/node_modules/grunt/lib/grunt/task.js:264:15) [31m
>> [39m    at Object.thisTask.fn (/var/lib/jenkins/workspace/development/node_modules/grunt/lib/grunt/task.js:82:16) [31m
>> [39m    at Object.<anonymous> (/var/lib/jenkins/workspace/development/node_modules/grunt/lib/util/task.js:301:30) [31m
>> [39m    at Task.runTaskFn (/var/lib/jenkins/workspace/development/node_modules/grunt/lib/util/task.js:251:24) [31m
>> [39m    at Task.<anonymous> (/var/lib/jenkins/workspace/development/node_modules/grunt/lib/util/task.js:300:12)
[33mWarning: Task "mochaTest:jenkins" failed. Use --force to continue. [39m


댓글 없음:

댓글 쓰기