Parcourir la source

chore: do not log warned error during tests

Evan You il y a 5 ans
Parent
commit
df954dc90f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      packages/runtime-core/src/errorHandling.ts

+ 1 - 1
packages/runtime-core/src/errorHandling.ts

@@ -153,7 +153,7 @@ function logError(
     // crash in dev by default so it's more noticeable
     if (throwInDev) {
       throw err
-    } else {
+    } else if (!__TEST__) {
       console.error(err)
     }
   } else {