From c7a4c52bae78dcfa3fd0c894f4f6a9f80578506c Mon Sep 17 00:00:00 2001 From: Camilo QS Date: Tue, 17 Mar 2020 15:06:36 -0400 Subject: [PATCH] Remove object spread to continue Node LTS 10/12 support (#304) --- src/native/toHaveStyleRule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/toHaveStyleRule.js b/src/native/toHaveStyleRule.js index b3a7cbf..0c4f86c 100644 --- a/src/native/toHaveStyleRule.js +++ b/src/native/toHaveStyleRule.js @@ -14,7 +14,7 @@ function toHaveStyleRule(component, property, expected) { * Merge all styles into one final style object and search for the desired * stylename against this object */ - const mergedStyles = styles.reduce((acc, item) => ({ ...acc, ...item }), {}) + const mergedStyles = styles.reduce((acc, item) => (Object.assign({}, acc, item )), {}) const received = mergedStyles[camelCasedProperty] const pass = !received && !expected && this.isNot