mocha-phantomjs-core icon indicating copy to clipboard operation
mocha-phantomjs-core copied to clipboard

Test output is horrible in Travis.

Open hayesmaker opened this issue 9 years ago • 12 comments

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 avatar Apr 07 '16 09:04 hayesmaker

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 avatar Apr 07 '16 10:04 hayesmaker

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

screen shot 2016-04-07 at 11 17 35

hayesmaker avatar Apr 07 '16 10:04 hayesmaker

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?

nathanboktae avatar Apr 07 '16 16:04 nathanboktae

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 [email protected]: Package renamed to phantomjs-prebuilt. Please update 'phantomjs' package references to 'phantomjs-prebuilt' [email protected] 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 avatar Apr 07 '16 19:04 hayesmaker

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.

hayesmaker avatar Apr 07 '16 19:04 hayesmaker

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.

nathanboktae avatar Apr 07 '16 20:04 nathanboktae

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?

yohanboniface avatar Jun 17 '16 07:06 yohanboniface

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

jpgcode avatar Oct 28 '16 03:10 jpgcode

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.

jpgcode avatar Oct 28 '16 04:10 jpgcode

@nathanboktae I agree with @jpgcode on this one

shellscape avatar Dec 20 '16 02:12 shellscape

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

akougblenou avatar Jan 03 '17 08:01 akougblenou

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.

nathanboktae avatar Jan 04 '17 17:01 nathanboktae