diff options
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r-- | ext/wasm/tester1.c-pp.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js index 56a4369cd..905340b23 100644 --- a/ext/wasm/tester1.c-pp.js +++ b/ext/wasm/tester1.c-pp.js @@ -3054,16 +3054,13 @@ globalThis.sqlite3InitModule = sqlite3InitModule; run. */) .assert(u1.getCapacity() + 2 === (await u2.addCapacity(2))) .assert(2 === (await u2.reduceCapacity(2))) - .assert(sqlite3.oo1.OpfsSAHPool.default instanceof Function) - .assert(sqlite3.oo1.OpfsSAHPool.default === - sqlite3.oo1.OpfsSAHPool[sahPoolConfig.name]) .assert(sqlite3.capi.sqlite3_js_vfs_list().indexOf(sahPoolConfig.name) >= 0); T.assert(0 === u1.getFileCount()); - const DbCtor = sqlite3.oo1.OpfsSAHPool.default; const dbName = '/foo.db'; - let db = new DbCtor(dbName); - T.assert(1 === u1.getFileCount()); + let db = new u1.OpfsSAHPoolDb(dbName); + T.assert(db instanceof sqlite3.oo1.DB) + .assert(1 === u1.getFileCount()); db.exec([ 'create table t(a);', 'insert into t(a) values(1),(2),(3)' @@ -3072,14 +3069,19 @@ globalThis.sqlite3InitModule = sqlite3InitModule; T.assert(3 === db.selectValue('select count(*) from t')); db.close(); T.assert(1 === u1.getFileCount()); - db = new DbCtor(dbName); + db = new u2.OpfsSAHPoolDb(dbName); T.assert(1 === u1.getFileCount()); db.close(); T.assert(1 === u1.getFileCount()) .assert(true === u1.unlink(dbName)) .assert(false === u1.unlink(dbName)) .assert(0 === u1.getFileCount()); - + if(0){ + /* Enable this block to inspect vfs's contents via the dev + console or OPFS Explorer browser extension. The + following bits will remove them. */ + return; + } T.assert(true === await u2.removeVfs()) .assert(false === await u1.removeVfs()) .assert(!sqlite3.capi.sqlite3_vfs_find(sahPoolConfig.name)); |