From 3f5aa057572385e89b961f6fb89987fc5565f498 Mon Sep 17 00:00:00 2001 From: Bruno Castro Date: Mon, 7 Sep 2020 12:27:35 -0300 Subject: [PATCH] fix: remove snapshots from #26 (#38) --- .../__snapshots__/to-have-style.js.snap | 28 ------------------- src/__tests__/to-have-style.js | 6 ++-- 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 src/__tests__/__snapshots__/to-have-style.js.snap diff --git a/src/__tests__/__snapshots__/to-have-style.js.snap b/src/__tests__/__snapshots__/to-have-style.js.snap deleted file mode 100644 index da86843..0000000 --- a/src/__tests__/__snapshots__/to-have-style.js.snap +++ /dev/null @@ -1,28 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`.toHaveStyle handles negative test cases 1`] = ` -"expect(element).toHaveStyle() - -- Expected - - backgroundColor: blue; - transform: [ - { -- \\"scale\\": 1 -+ \\"scale\\": 2 - } - ];" -`; - -exports[`.toHaveStyle handles transform when transform undefined 1`] = ` -"expect(element).toHaveStyle() - -- Expected - -- transform: [ -- { -- \\"scale\\": 1 -- } -- ]; -+ transform: undefined;" -`; diff --git a/src/__tests__/to-have-style.js b/src/__tests__/to-have-style.js index 054a1f4..3802f14 100644 --- a/src/__tests__/to-have-style.js +++ b/src/__tests__/to-have-style.js @@ -52,7 +52,7 @@ describe('.toHaveStyle', () => { const container = getByTestId('container'); expect(() => expect(container).toHaveStyle({ backgroundColor: 'blue', transform: [{ scale: 1 }] }), - ).toThrowErrorMatchingSnapshot(); + ).toThrowError(); expect(() => expect(container).toHaveStyle({ fontWeight: 'bold' })).toThrowError(); expect(() => expect(container).not.toHaveStyle({ color: 'black' })).toThrowError(); }); @@ -83,8 +83,6 @@ describe('.toHaveStyle', () => { ); const container = getByTestId('container'); - expect(() => - expect(container).toHaveStyle({ transform: [{ scale: 1 }] }), - ).toThrowErrorMatchingSnapshot(); + expect(() => expect(container).toHaveStyle({ transform: [{ scale: 1 }] })).toThrowError(); }); });