title: How do I override config values at runtime with node-config?
body: <p>I'd like to override some values at test-time, specifically setting my retries for an http service to 1 (immediate failure, no retries). Our project uses <code>node-config</code>. According to the <a href="https://github.com/lorenwest/node-config/wiki/Command-Line-Overrides" rel="noreferrer">docs</a> I can override with <code>NODE_CONFIG</code> env variable:</p>
  
  <pre><code>node myapp.js --NODE_CONFIG='{"Customer":{"dbConfig":{"host":"customerdb.prod"}}}'
  </code></pre>
  
  <p>Well I would prefer to do this in my test, but not for all tests. The <a href="https://github.com/lorenwest/node-config/blob/083a783daa5e2426d679890ae7e3fb3149100d13/lib/config.js#L186" rel="noreferrer">code</a> says that you can allow config mutations by setting <code>ALLOW_CONFIG_MUTATIONS</code>. </p>
  
  <pre><code>process.env.ALLOW_CONFIG_MUTATIONS = "true";
  const importFresh = require('import-fresh');
  importFresh("config");
  
  process.env.NODE_CONFIG = JSON.stringify({httpServices:{integration:{enrich: {retryInterval: 1, retries: 1}}}});
  expect(process.env.NODE_CONFIG, 'NODE_CONFIG not set').to.exist();
  expect(process.env.NODE_CONFIG, 'NODE_CONFIG not set').to.match(/retryInterval/);
  expect(process.env.ALLOW_CONFIG_MUTATIONS, 'ALLOW_CONFIG_MUTATIONS not set').to.equal("true");
  
  const testConfig = require("config");
  console.dir(testConfig.get("httpServices.integration.enrich"));
  expect(testConfig.get("httpServices.integration.enrich.retryInterval"), 'config value not set to 1').to.equal(1);
  </code></pre>
  
  <p>Result: </p>
  
  <pre><code>{ url: 'https://internal-**********',
    retryInterval: 5000,
    retries: 5 }
   `Error: config value not set to 1: Expected 5000 to equal specified value: 1`
  </code></pre>
  
  <p>How do I get this override to work? </p>
  
  <p>(expect is from Hapi.js Code library)</p>