Browse Source

chore: do not log warned error during tests

Evan You 5 years ago
parent
commit
df954dc90f
1 changed files with 1 additions and 1 deletions
  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 {