serval-dna/test/default/pre.js.inc
Andrew Bettison fc5c87e213 Squashed 'libsodium/' content from commit 60329a84
git-subtree-dir: libsodium
git-subtree-split: 60329a84ef7edb278b949c53c640031e44ce0157
2017-09-19 10:15:28 +09:30

21 lines
498 B
PHP
Executable File

try {
this['Module'] = Module;
Module.test;
} catch(e) {
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');
});
} else {
Module['print'] = function(x) {
var event = new Event('test-output');
event.data = x;
window.dispatchEvent(event);
};
}