Skip to content

Commit

Permalink
Don't block usage of xunit with file since it has been fixed (mochajs…
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanboktae committed Dec 27, 2015
1 parent 39996c1 commit ad77952
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
5 changes: 0 additions & 5 deletions bin/mocha-phantomjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ var config = JSON.stringify({
ignoreResourceErrors: program.ignoreResourceErrors
});

if (program.reporter === 'xunit' && program.file) {
console.error('The xunit reporter does not work with the --file option. Pipe it to a file instead. See #114.')
process.exit(-3)
}

if (reporter) {
if (fileExists(reporter)) {
reporter = path.resolve(process.cwd(), reporter);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"command line",
"browser"
],
"version": "4.0.1",
"version": "4.0.2",
"author": "Nathan Black <nathan@nathanblack.org> (http://nathanblack.org)",
"licenses": [
{
Expand Down
12 changes: 6 additions & 6 deletions test/mocha-phantomjs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe 'mocha-phantomjs', ->
urlString = url.format { protocol: 'file', hostname: '', pathname: fullPath } if process.platform isnt 'win32'

run = (args) ->
new Promise (resolve, reject) ->
new Promise (resolve, reject) ->
stdout = ''
stderr = ''
spawnArgs = ["#{process.cwd()}/bin/mocha-phantomjs"].concat(args)
Expand Down Expand Up @@ -123,24 +123,24 @@ describe 'mocha-phantomjs', ->
{ code, stderr } = yield run ['-R', 'test/reporters/node-only', fileURL('mixed')]

stderr.should.match /Node modules cannot be required/
code.should.not.equal 0
code.should.not.equal 0

describe 'hooks', ->
it 'should fail gracefully if they do not exist', ->
{ code, stderr } = yield run ['-k', 'nonexistant-file.js', fileURL('passing')]

code.should.not.equal 0
stderr.should.contain('Error loading hooks').and.contain "nonexistant-file.js"

it 'has a hook for before tests are started', ->
{ code, stdout } = yield run ['-k', 'test/hooks/before-start.js', fileURL('passing')]

stdout.should.contain 'Before start called!'
code.should.equal 0

it 'has a hook for after the test run finishes', ->
{ code, stdout } = yield run ['-k', 'test/hooks/after-end.js', fileURL('passing')]

stdout.should.contain 'After end called!'
code.should.equal 0

Expand Down Expand Up @@ -184,7 +184,7 @@ describe 'mocha-phantomjs', ->
describe 'no-colors', ->
it 'by default will output in color', ->
{ stdout } = yield run ['-R', 'dot', fileURL('mixed')]

stdout.should.match /\u001b\[90m\․\u001b\[0m/ # grey
stdout.should.match /\u001b\[36m\․\u001b\[0m/ # cyan
stdout.should.match /\u001b\[31m\․\u001b\[0m/ # red
Expand Down

0 comments on commit ad77952

Please sign in to comment.