From c3e791ae2357bbe220c133e3ab417bd5f7c55410 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 20 Jun 2018 22:46:37 +0300 Subject: initial unit testing setup --- vnext/src/components/__tests__/Avatar.test.js | 15 +++++++++++++++ .../__tests__/__snapshots__/Avatar.test.js.snap | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 vnext/src/components/__tests__/Avatar.test.js create mode 100644 vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap (limited to 'vnext/src') diff --git a/vnext/src/components/__tests__/Avatar.test.js b/vnext/src/components/__tests__/Avatar.test.js new file mode 100644 index 00000000..ac33abe9 --- /dev/null +++ b/vnext/src/components/__tests__/Avatar.test.js @@ -0,0 +1,15 @@ +import React from 'react'; +import { MemoryRouter } from 'react-router-dom'; + +import Avatar from '../Avatar'; +import renderer from 'react-test-renderer'; + +test('Avatar renders correctly', () => { + const component = renderer.create( + + + + ); + let tree = component.toJSON(); + expect(tree).toMatchSnapshot(); +}); \ No newline at end of file diff --git a/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap b/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap new file mode 100644 index 00000000..175befa0 --- /dev/null +++ b/vnext/src/components/__tests__/__snapshots__/Avatar.test.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Avatar renders correctly 1`] = ` +
+ + ugnich + +
+`; -- cgit v1.2.3