okfn / timemapper

Create and share elegant timelines and timemaps fast
http://timemapper.okfnlabs.org/
MIT License
273 stars 60 forks source link

exception raises when running test if no settings.json present. #147

Closed hychen closed 10 years ago

hychen commented 10 years ago

Summary

runs test by typing the following command.

$ mocha

and get the following errors.

/Users/hychen/github/hychen/timemapper/node_modules/passport-twitter/node_modules/passport-oauth1/lib/strategy.js:83 if (!options.consumerKey) { throw new TypeError('OAuthStrategy requires a co ^ TypeError: OAuthStrategy requires a consumerKey option at Strategy.OAuthStrategy (/Users/hychen/github/hychen/timemapper/node_modules/passport-twitter/node_modules/passport-oauth1/lib/strategy.js:83:37) at new Strategy (/Users/hychen/github/hychen/timemapper/node_modules/passport-twitter/lib/strategy.js:53:17) at Object. (/Users/hychen/github/hychen/timemapper/app.js:158:14) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/Users/hychen/github/hychen/timemapper/test/app.test.js:12:11) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at /usr/local/lib/node_modules/mocha/lib/mocha.js:172:27 at Array.forEach (native) at Mocha.loadFiles (/usr/local/lib/node_modules/mocha/lib/mocha.js:169:14) at Mocha.run (/usr/local/lib/node_modules/mocha/lib/mocha.js:356:31) at Object. (/usr/local/lib/node_modules/mocha/bin/_mocha:366:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3

root causes

app.test.js does not set correct config for running test on local.