From 304d32151c530e164fc4f17dae5f26007c096c26 Mon Sep 17 00:00:00 2001 From: Danilo Hoffmann Date: Tue, 10 Dec 2019 11:14:17 +0200 Subject: [PATCH] chore: safety check in jest actions serializer --- src/jest-serializer/NgrxActionSerializer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jest-serializer/NgrxActionSerializer.js b/src/jest-serializer/NgrxActionSerializer.js index 16d8692feb..3d2ebe87c7 100644 --- a/src/jest-serializer/NgrxActionSerializer.js +++ b/src/jest-serializer/NgrxActionSerializer.js @@ -30,6 +30,7 @@ const print = (val, _, indent) => { const test = val => { return ( + val && typeof val === 'object' && Object.keys(val).includes('type') && Object.keys(val).filter(key => !['type', 'payload'].includes(key)).length === 0