Using Custom Arguments and Configuration Properties - msssk/intern GitHub Wiki

As of Intern 1.6, it is possible to retrieve the current Intern configuration being used to run tests, as well as retrieve custom arguments. This information is available from the main intern object:

require([ 'intern' ], function (intern) {
  // arguments object
  intern.args;

  // config object
  intern.config;
});

This makes it possible to, for example, define a dynamic proxy URL from the command-line or Grunt task:

// in tests/config.js
define([ 'intern' ], function (intern) {
  return {
    proxyUrl: intern.args.proxyUrl,

    // ... additional configuration ...
  };
});
$ intern-runner config=tests/config proxyUrl=http://www.example.com:1234/