Skip to content

Commit

Permalink
chore: safety check in jest actions serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhyi authored and shauke committed Jan 10, 2020
1 parent a7f5aee commit 304d321
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/jest-serializer/NgrxActionSerializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 304d321

Please sign in to comment.