Make databases.list, database.remove, and database.getLike all do their DB work off the main thread. That's the last thing I'm aware of.
This commit is contained in:
@ -281,6 +281,11 @@ static void _test_database(const tf_test_options_t* options)
|
||||
" exit(5);\n"
|
||||
" }\n"
|
||||
" await db.set('c', 3);\n"
|
||||
" await db.set('d', 3);\n"
|
||||
" await db.remove('d', 3);\n"
|
||||
" if (JSON.stringify(await db.getLike('b%')) != '{\"b\":\"2\"}') {\n"
|
||||
" exit(6);\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" var expected = ['a', 'b', 'c'];\n"
|
||||
" var have = await db.getAll();\n"
|
||||
@ -297,6 +302,9 @@ static void _test_database(const tf_test_options_t* options)
|
||||
" print('Expected but did not find: ' + JSON.stringify(expected));\n"
|
||||
" exit(4);\n"
|
||||
" }\n"
|
||||
" if (JSON.stringify(await databases.list('%')) != '[\"testdb\"]') {\n"
|
||||
" exit(7);\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
"main();");
|
||||
|
||||
|
Reference in New Issue
Block a user