aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/SQLTester/SQLTester.run.mjs
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-08-30 14:20:02 +0000
committerstephan <stephan@noemail.net>2023-08-30 14:20:02 +0000
commit8dd07389ac9ae965fa984451af807b719a867549 (patch)
treea58d0da2210b6a41eae624b5e60fca2a81b24648 /ext/wasm/SQLTester/SQLTester.run.mjs
parent24c32c2e390de4116ba9e768cff9bcd3ad4f5dc6 (diff)
downloadsqlite-8dd07389ac9ae965fa984451af807b719a867549.tar.gz
sqlite-8dd07389ac9ae965fa984451af807b719a867549.zip
When a JS SQLTester script throws, report the exception details back to the UI regardless of whether it's fatal.
FossilOrigin-Name: 273d3b05f630d399d42914e95c416b107b4746bbef129cfba9d00fd921666261
Diffstat (limited to 'ext/wasm/SQLTester/SQLTester.run.mjs')
-rw-r--r--ext/wasm/SQLTester/SQLTester.run.mjs4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/wasm/SQLTester/SQLTester.run.mjs b/ext/wasm/SQLTester/SQLTester.run.mjs
index 4a0890459..0f91230fd 100644
--- a/ext/wasm/SQLTester/SQLTester.run.mjs
+++ b/ext/wasm/SQLTester/SQLTester.run.mjs
@@ -63,6 +63,7 @@ SELECT 1, null;
SELECT 1, 2;
intentional error;
--run
+/* ---intentional-failure */
--testcase json-1
SELECT json_array(1,2,3)
--json [1,2,3]
@@ -96,6 +97,7 @@ const sqt = new ns.SQLTester()
.setLogger(console.log.bind(console))
.verbosity(1)
.addTestScript(ts);
+sqt.outer().outputPrefix('');
const runTests = function(){
try{
@@ -127,7 +129,7 @@ if( globalThis.WorkerGlobalScope ){
switch(data.type){
case 'run-tests':{
try{ runTests(); }
- finally{ wPost('tests-end'); }
+ finally{ wPost('tests-end', sqt.metrics); }
break;
}
default: