From 66561ce2a1d56a99641069a48185136c32ced8db Mon Sep 17 00:00:00 2001 From: Citrinin Date: Fri, 23 Oct 2020 23:40:37 +0300 Subject: [PATCH] add header tests --- .../__snapshots__/header.test.js.snap | 103 ++++++++++++++++++ src/components/__tests__/header.test.js | 13 +++ 2 files changed, 116 insertions(+) create mode 100644 src/components/__tests__/__snapshots__/header.test.js.snap create mode 100644 src/components/__tests__/header.test.js diff --git a/src/components/__tests__/__snapshots__/header.test.js.snap b/src/components/__tests__/__snapshots__/header.test.js.snap new file mode 100644 index 0000000..54c655e --- /dev/null +++ b/src/components/__tests__/__snapshots__/header.test.js.snap @@ -0,0 +1,103 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Header renders correctly 1`] = ` +
+ +

+ github profile markdown generator logo +
+ heading +
+

+
+
+ +
+ + 0 + +
+
+ +
+ + 0 + +
+
+
+
+`; diff --git a/src/components/__tests__/header.test.js b/src/components/__tests__/header.test.js new file mode 100644 index 0000000..cbf7033 --- /dev/null +++ b/src/components/__tests__/header.test.js @@ -0,0 +1,13 @@ +import React from "react" +import renderer from "react-test-renderer" + +import Header from "../header" + +describe("Header", () => { + it("renders correctly", () => { + const tree = renderer + .create(
) + .toJSON() + expect(tree).toMatchSnapshot() + }) +})