don't use WASM for Node tests until we get memory errors fixed

This commit is contained in:
Steven Hugg 2018-07-10 00:09:10 -05:00
parent a208f19efe
commit 65210b39b8
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,9 @@
"use strict"; "use strict";
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function';
var ENVIRONMENT_IS_WEB = typeof window === 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
// WebAssembly module cache // WebAssembly module cache
// TODO: leaks memory even when disabled... // TODO: leaks memory even when disabled...
var _WASM_module_cache = {}; var _WASM_module_cache = {};
@ -313,7 +317,7 @@ function loadWASM(modulename, debug) {
} }
function loadNative(modulename, debug) { function loadNative(modulename, debug) {
// detect WASM // detect WASM
if (typeof WebAssembly === 'object') { if (CACHE_WASM_MODULES && typeof WebAssembly === 'object') {
loadWASM(modulename); loadWASM(modulename);
} else { } else {
load(modulename); load(modulename);
@ -1389,10 +1393,6 @@ function handleMessage(data) {
console.log("Unknown message",data); console.log("Unknown message",data);
} }
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function';
var ENVIRONMENT_IS_WEB = typeof window === 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
if (ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) {
onmessage = function(e) { onmessage = function(e) {
var result = handleMessage(e.data); var result = handleMessage(e.data);

View File

@ -13,7 +13,7 @@
"alwaysStrict": true "alwaysStrict": true
}, },
"include": [ "include": [
"./src/*.ts", "./src/**/*.ts",
"./localForage/typings/*.ts" "./localForage/typings/*.ts"
] ]
} }