diff options
Diffstat (limited to 'ext/wasm/testing1.js')
-rw-r--r-- | ext/wasm/testing1.js | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/ext/wasm/testing1.js b/ext/wasm/testing1.js index a733156e7..414421952 100644 --- a/ext/wasm/testing1.js +++ b/ext/wasm/testing1.js @@ -19,7 +19,8 @@ const toss = function(...args){throw new Error(args.join(' '))}; const debug = console.debug.bind(console); const eOutput = document.querySelector('#test-output'); - const log = console.log.bind(console) + const log = console.log.bind(console), + warn = console.warn.bind(console); const logHtml = function(...args){ log.apply(this, args); const ln = document.createElement('div'); @@ -162,10 +163,10 @@ } try { - throw new capi.WasmAllocError; + throw new sqlite3.WasmAllocError; }catch(e){ T.assert(e instanceof Error) - .assert(e instanceof capi.WasmAllocError); + .assert(e instanceof sqlite3.WasmAllocError); } try { @@ -1012,7 +1013,7 @@ wasm = capi.wasm; log("Loaded module:",capi.sqlite3_libversion(), capi.sqlite3_sourceid()); log("Build options:",wasm.compileOptionUsed()); - + capi.sqlite3_web_persistent_dir()/*will install OPFS if available, plus a and non-locking VFS*/; if(1){ /* Let's grab those last few lines of test coverage for sqlite3-api.js... */ @@ -1067,13 +1068,7 @@ log('capi.wasm.exports',capi.wasm.exports); }; - sqlite3InitModule(self.sqlite3TestModule).then(function(theModule){ - /** Use a timeout so that we are (hopefully) out from under - the module init stack when our setup gets run. Just on - principle, not because we _need_ to be. */ - //console.debug("theModule =",theModule); - //setTimeout(()=>runTests(theModule), 0); - // ^^^ Chrome warns: "VIOLATION: setTimeout() handler took A WHOLE 50ms!" + self.sqlite3TestModule.initSqlite3().then(function(theModule){ self._MODULE = theModule /* this is only to facilitate testing from the console */ runTests(theModule); }); |