nathanboktae / mocha-phantomjs

:coffee: :ghost: Run client-side mocha tests in the command line through phantomjs
MIT License
954 stars 112 forks source link

Allow programmatic send of options to reporter. #187

Closed devel-pa closed 9 years ago

nathanboktae commented 9 years ago

Hi, a few questions.

  1. Why? What reporters take options? We already pass through environment variables if you need configuration in a custom reporter.
  2. So you put a reporterOptions object on a global. I don't see any usages of it in mocha.js.
  3. No Tests
  4. No Documentation
devel-pa commented 9 years ago

Hi,

  1. Maybe is not what is needed. Also, xunit report and few others takes options. https://github.com/mochajs/mocha/blob/1.20.1/mocha.js#L1725

1'. I've tried to access process.env vars but no chance. I'll try again. I would prefer that.

  1. Mocha 2 have a reporterOptions but I couldn't make it work with current state. There is any other way to send options?
  2. You're right, just wanted to know if you're interested on that.
  3. Same as previous.

Any plan for Mocha 2 or 3?

Thanks, Paul

nathanboktae commented 9 years ago

I've tried to access process.env vars but no chance.

Because you're running in phantomjs, not node. They are very different execution contexts.

Any plan for Mocha 2 or 3?

For the next version of mocha-phantomjs, we're splitting out the core phantomjs part from the node cli part. The core is at nathanboktae/mocha-phantomjs-core , and I already have tests passing for phantomjs 1.x with mocha 2.24

Due to that, I'm not interested in taking the pull request here as mocha-phantomjs.coffee will be deleted soon.

devel-pa commented 9 years ago

Thanks, I understood. No problem.