forked from node-formidable/formidable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.js
29 lines (24 loc) · 819 Bytes
/
common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var path = require('path'),
fs = require('fs');
require.paths.unshift(path.dirname(__dirname)+'/lib');
var util = require('formidable/util');
try {
global.Gently = require('gently');
} catch (e) {
throw new Error('this test suite requires node-gently');
}
global.GENTLY = new Gently();
global.puts = util.puts;
global.p = function() {
util.error(util.inspect.apply(null, arguments));
};
global.assert = require('assert');
global.TEST_PORT = 13532;
global.TEST_FIXTURES = path.join(__dirname, 'fixture');
global.TEST_TMP = path.join(__dirname, 'tmp');
// Stupid new feature in node that complains about gently attaching too many
// listeners to process 'exit'. This is a workaround until I can think of a
// better way to deal with this.
if (process.setMaxListeners) {
process.setMaxListeners(10000);
}