From 33d87c1d8833fbd3e850edfb65b7e0a4f29f62ad Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Wed, 22 May 2019 20:36:54 -0700 Subject: [PATCH] Fix test compiling. --- testutils/src/jest-shim.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testutils/src/jest-shim.ts b/testutils/src/jest-shim.ts index 80d9c498b8b9..9c5522c1fc25 100644 --- a/testutils/src/jest-shim.ts +++ b/testutils/src/jest-shim.ts @@ -44,8 +44,9 @@ process.on('unhandledRejection', (error, promise) => { console.error('Unhandled promise rejection somewhere in tests'); if (error) { console.error(error); - if (error.stack) { - console.error(error.stack); + const stack = (error as any).stack; + if (stack) { + console.error(stack); } } promise.catch(err => console.error('promise rejected', err));