libsodium 1.0.8
[tomato.git] / release / src / router / libsodium / test / default / pre.js.inc
blob130c1371f231bef181db43f1146e2808bffaecbd
1 try {
2     this['Module'] = Module;
3     Module.test;
4 } catch(e) {
5     this['Module'] = Module = {};
7 if (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     };