Skip to content

Instantly share code, notes, and snippets.

@searls
Created August 28, 2015 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save searls/319635d4b926dd53622b to your computer and use it in GitHub Desktop.
Save searls/319635d4b926dd53622b to your computer and use it in GitHub Desktop.
function turnNodeConfigIntoBrowserJs() {
var fs = require('fs');
var testEnvPath = 'tmp/test-environment.js';
var testEnv = require('../config/environment')('test');
fs.writeFileSync(testEnvPath, 'window.MY_APP_CONFIG = '+JSON.stringify(testEnv));
return testEnvPath;
}
var testSource = []
.concat([
injectableTestEnvironment(),
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment