ソースを参照

UI Tests: Disable early abort

Danilo Bargen 6 年 前
コミット
426463be79
1 ファイル変更14 行追加12 行削除
  1. 14 12
      tests/ui/run.ts

+ 14 - 12
tests/ui/run.ts

@@ -197,20 +197,22 @@ const TEST_URL = 'http://localhost:7777/tests/ui/compose_area.html';
     }
     try {
         for (const [name, testfunc] of TESTS) {
-            if (filterQuery === undefined || name.toLowerCase().indexOf(filterQuery.toLowerCase()) !== -1) {
-                console.info(TermColor.blue(`» ${i + 1}: Running test: ${name}`));
-                await driver.get(TEST_URL);
-                await testfunc(driver);
-                success++;
-            } else {
-                skipped++;
+            try {
+                if (filterQuery === undefined || name.toLowerCase().indexOf(filterQuery.toLowerCase()) !== -1) {
+                    i++;
+                    console.info(TermColor.blue(`» ${i}: Running test: ${name}`));
+                    await driver.get(TEST_URL);
+                    await testfunc(driver);
+                    success++;
+                } else {
+                    skipped++;
+                }
+            } catch (e) {
+                console.error(TermColor.red(`\nTest failed:`));
+                console.error(e);
+                failed++;
             }
-            i++;
         }
-    } catch (e) {
-        console.error(TermColor.red(`\nTest failed:`));
-        console.error(e);
-        failed++;
     } finally {
         await driver.quit();
     }