dgarlitt / karma-nyan-reporter

Nyan Cat style reporter based on the Mocha version
MIT License
169 stars 19 forks source link

Karma-nyan-reporter works strange when node upgraded to 0.12 from 0.10 #10

Closed yhnavein closed 9 years ago

yhnavein commented 9 years ago

Hi,

After upgrading node from v0.10 to v0.12.3 I have a problem with reporting in karma. Here is example what's wrong:

➜ webapp >$ karma start test/karma.conf.js --single-run --browsers PhantomJS --reporters nyan

 46  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_,------,
 0   -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_|   /\_/\ 
 0   -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_|__( ^ .^) 
     -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_%  

When I run the same command but from npm test alias I'll see something even more bizarre:

PhantomJS 1.9.8 (Linux): Executed 40 of 60 SUCCESS (0 secs / 0.035 secs)
 40  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_,------,
 0   -_-_-_-_-_-_-_-_% 

And just to compare with any different reporter: ➜ webapp >$ karma start test/karma.conf.js --single-run --browsers PhantomJS --reporters dots

............................................................
PhantomJS 1.9.8 (Linux): Executed 60 of 60 SUCCESS (0.056 secs / 0.053 secs)

Everything is fine in dots reporter

Some info: elementaryOS 0.3 node -v 0.12.3 npm -v 2.10.0 package.json devDependencies:

    "karma": "~0.12.32", 
    "grunt": "~0.4.1",
    "karma-chrome-launcher": "0.1.4",
    "karma-jasmine": "~0.1.5",
    "karma-phantomjs-launcher": "0.1.4",
    "grunt-karma": "~0.10"

Cheers,

dgarlitt commented 9 years ago

I looked into this issue but was unable to reproduce it. I tested it using the identical version of node and using both the karma-cli version and the npm test version but still was unable to find any discrepancy. I would be more than happy to review/accept a pull request from you if you are able to isolate the issue in your environment.

dgarlitt commented 9 years ago

@yhnavein Could you let me know if your issue is cleared up with the last release? I'm still unable to reproduce it. Thanks!

yhnavein commented 9 years ago

Had a moment, so I fixed it :)

dgarlitt commented 9 years ago

@yhnavein Awesome! Your fix has been added to release 0.2.0 and is available now via npm.