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

[RFC] .js config instead of .json #324

Open
StevenLangbroek opened this issue May 12, 2015 · 0 comments
Open

[RFC] .js config instead of .json #324

StevenLangbroek opened this issue May 12, 2015 · 0 comments

Comments

@StevenLangbroek
Copy link

By switching to a .js instead of .json configuration, it would be easier to move all configuration into the actual config file (for example the driver builder and output formatting), and to configure at runtime (based on whatever you like). Think grunt or karma. I imagine this would look something like this:

var mocks = require('./mocks');
var cucumber = require('cucumber-junit');
var fs = require('fs');

module.exports = function(pioneer){
  return pioneer.config({
    format: 'json',
    output: './spec/results/integration.xml',
    before: function(){
      return mocks.start();
    },

    after: function(results){
      fs.writeFileSync(this.output, cucumber(results));
      mocks.stop();
    }
  });
}
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

1 participant