소스 검색

chore: do not log warned error during tests

Evan You 5 년 전
부모
커밋
df954dc90f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
     // crash in dev by default so it's more noticeable
     if (throwInDev) {
     if (throwInDev) {
       throw err
       throw err
-    } else {
+    } else if (!__TEST__) {
       console.error(err)
       console.error(err)
     }
     }
   } else {
   } else {