nathanboktae / mocha-casperjs

Write CasperJS tests using Mocha
MIT License
120 stars 30 forks source link

require external module before test runs? #102

Closed mzuneska closed 7 years ago

mzuneska commented 8 years ago

Is there currently a way to globally require a module before running the tests? I see mocha supports this via the --require option. I have what feels like the canonical problem of wanting to remove some boiler plate from my tests in to a helper and set up some additional global helper functions. It seems straightforward enough to implement similar to the other options that are passed in if not (and I'd be totally willing to submit a PR for it) but I just wanted to verify there wasn't a way currently that I was missing. Thanks!

nathanboktae commented 8 years ago

Yup submit a PR, thanks. In CLI.js open the options and load any modules there.