1try {
2    this['Module'] = Module;
3    Module.test;
4} catch(e) {
5    this['Module'] = Module = {};
6}
7if (typeof process === 'object') {
8    Module['preRun'] = Module['preRun'] || [];
9    Module['preRun'].push(function() {
10        FS.init();
11        FS.mkdir('/test-data');
12        FS.mount(NODEFS,  { root: '.' }, '/test-data');
13    });
14} else {
15    Module['print'] = function(x) {
16        var event = new Event('test-output');
17        event.data = x;
18        window.dispatchEvent(event);
19    };
20}
21