Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading/including additional config files inside testacular.conf.js #294

Closed
matsko opened this issue Jan 13, 2013 · 4 comments
Closed

Loading/including additional config files inside testacular.conf.js #294

matsko opened this issue Jan 13, 2013 · 4 comments

Comments

@matsko
Copy link
Contributor

matsko commented Jan 13, 2013

Would it be possible to get testacular to be able to include additional configuration files inside of it's exsting configuration file?

Image if you have multiple testacular suites (like e2e tests, unit tests, 3rd party tests inside of angularjs) and you have multiple separate testacular.conf.js file (testacular.e2e.conf.js, testacular.unit.conf.js, etc...) and you want the bulk of the configurations to be shared across all of them. Then you would have to edit each file each time you make a change (like changing browsers, watch directives and so on). It would be nice if there was a shared configuration between multiple files.

I've tried doing var shared = require('./shared.conf.js'); but the variable is empty (even though the file is found and there is data inside).

@vojtajina
Copy link
Contributor

Yep, you can do that. We do the same thing on AngularJS: https://github.com/angular/angular.js/blob/master/testacular-e2e.conf.js#L1

However, it handles relative paths incorrectly (it behaves as if the config file was in testacular's source). That's why you need to use __dirname. https://github.com/vojtajina/testacular/issues/304

@matsko
Copy link
Contributor Author

matsko commented Jan 15, 2013

Awesome, could you possibly make a note of this in the readme?

@vojtajina
Copy link
Contributor

You can update the docs at wiki https://github.com/vojtajina/testacular/wiki

@matsko
Copy link
Contributor Author

matsko commented Jan 16, 2013

Done. Thanks for the quick help :)

https://github.com/testacular/testacular/wiki/Configuration-File-Overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants