diff --git a/test/default/pre.js.inc b/test/default/pre.js.inc index 130c1371..8b8d589a 100755 --- a/test/default/pre.js.inc +++ b/test/default/pre.js.inc @@ -5,12 +5,14 @@ try { this['Module'] = Module = {}; } if (typeof process === 'object') { - Module['preRun'] = Module['preRun'] || []; - Module['preRun'].push(function() { - FS.init(); - FS.mkdir('/test-data'); - FS.mount(NODEFS, { root: '.' }, '/test-data'); - }); + if (typeof(FS) === 'object') { + Module['preRun'] = Module['preRun'] || []; + Module['preRun'].push(function() { + FS.init(); + FS.mkdir('/test-data'); + FS.mount(NODEFS, { root: '.' }, '/test-data'); + }); + } } else { Module['print'] = function(x) { var event = new Event('test-output');