From 53a7e342e9583651d343869a781b3bbde7424af2 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 20 Feb 2020 17:06:05 -0800 Subject: [PATCH] fix(testrunner): support throwing non-errors --- utils/testrunner/SourceMapSupport.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/testrunner/SourceMapSupport.js b/utils/testrunner/SourceMapSupport.js index ae8933c55e..2cabccc005 100644 --- a/utils/testrunner/SourceMapSupport.js +++ b/utils/testrunner/SourceMapSupport.js @@ -27,6 +27,8 @@ class SourceMapSupport { } async rewriteStackTraceWithSourceMaps(error) { + if (!error.stack || typeof error.stack !== 'string') + return; const stackFrames = error.stack.split('\n'); for (let i = 0; i < stackFrames.length; ++i) { const stackFrame = stackFrames[i];