Name: js-handler/node_modules/restify/node_modules/formidable/test/legacy/common.js
| 1: | var path = require('path'), |
| 2: | fs = require('fs'); |
| 3: | |
| 4: | try { |
| 5: | global.Gently = require('gently'); |
| 6: | } catch (e) { |
| 7: | throw new Error('this test suite requires node-gently'); |
| 8: | } |
| 9: | |
| 10: | exports.lib = path.join(__dirname, '../../lib'); |
| 11: | |
| 12: | global.GENTLY = new Gently(); |
| 13: | |
| 14: | global.assert = require('assert'); |
| 15: | global.TEST_PORT = 13532; |
| 16: | global.TEST_FIXTURES = path.join(__dirname, '../fixture'); |
| 17: | global.TEST_TMP = path.join(__dirname, '../tmp'); |
| 18: | |
| 19: | // Stupid new feature in node that complains about gently attaching too many |
| 20: | // listeners to process 'exit'. This is a workaround until I can think of a |
| 21: | // better way to deal with this. |
| 22: | if (process.setMaxListeners) { |
| 23: | process.setMaxListeners(10000); |
| 24: | } |
