nathanboktae / mocha-phantomjs-core

Easiest way to run client-side Mocha tests in PhantomJS or SlimerJS :ghost:
MIT License
34 stars 11 forks source link

Test output is horrible in Travis. #20

Open hayesmaker opened 8 years ago

hayesmaker commented 8 years ago

i used to run tests like: mocha-phantomjs

now since mocha-phantomjs just breaks my build all of a sudden https://travis-ci.org/hayesmaker/thrust-platform/builds/121379410

now I'm told to use this module, and output looks horrible. see comments below.

hayesmaker commented 8 years ago

so i installed an updated phantomjs, and this core.. now my tests run, but the nice colours in the output I used to have don't show anymore... is that something I have to live with now?

screen shot 2016-04-07 at 11 15 57
hayesmaker commented 8 years ago

the output is even worse on travis, most of the text is missing.

screen shot 2016-04-07 at 11 17 35
nathanboktae commented 8 years ago

now since mocha-phantomjs just breaks my build all of a sudden

There was some issue with bitbucket that is owned by a dependant package. It works now. You can go ahead and go back to it if you wish. I want to move the CLI into this library so it's much easier to use first before telling everyone to move off of mocha-phantomjs... and even then I'd have a simple binary wrapper for it so you can just run mocha-phantomjs

what version of phantomjs are you using?

hayesmaker commented 8 years ago

I'm using "phantomjs": "^2.1.3"

travis seems to npm install with these warning about phantom.. but I don't think I had them locally.

npm WARN deprecated phantomjs@2.1.3: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt' phantomjs@2.1.3 install /home/travis/build/hayesmaker/thrust-platform/node_modules/phantomjs node install.js Found PhantomJS at /usr/local/phantomjs/bin/phantomjs ...verifying PhantomJS detected, but wrong version 1.9.8 @ /usr/local/phantomjs/bin/phantomjs.

https://travis-ci.org/hayesmaker/thrust-platform#L144

hayesmaker commented 8 years ago

I guess it's more of a Travis issue with phantomjs: https://github.com/travis-ci/travis-ci/issues/3225 would be great to get better output, but the tests don't fail at least.

I'll explore workarounds to get phantom2 installed on travis from that thread.

nathanboktae commented 8 years ago

I'll explore workarounds to get phantom2 installed on travis from that thread.

Do what this project does and just wget it

Though I think one regression or change is that mocha-phantomjs-core is defaulting to no color output rather than color - or the bundled mocha can't detect it so it leaves it off. I should see what I can do from the phantom side about that.

yohanboniface commented 8 years ago

Seems that even passing useColors: true in the json config leaves the output without color (on a local terminal, not referring to travis). Any hints?

jpgcode commented 8 years ago

Getting the same issue, no colors. Any way to enable them?

jpgcode commented 8 years ago

Fixed passing mocha.useColors(true); to the mocha config in the TestRunner file. This is in line 148 of mocha-phantomjs-core.js which is expecting the configuration to be passed. Since the documentation is not clear to set this, the colors are consider by the module as false. mocha.useColors(config.useColors).

Please update documentation or set the line to have the colors enable as default if they are not passed as false explicitly in the config.

shellscape commented 7 years ago

@nathanboktae I agree with @jpgcode on this one

akougblenou commented 7 years ago

Had the same problem, an update of this issue would be fantastic!

nathanboktae commented 7 years ago

Seems that even passing useColors: true in the json config leaves the output without color (on a local terminal, not referring to travis).

I can't reproduce this issue, and I have tests for it too.

image

Though I acknowledge that the default of colors being on is a regression from mocha-phantomjs.