From f840d018e5a61c39fe465d28ff31d08b9a03a5a8 Mon Sep 17 00:00:00 2001 From: Matthew Shao Date: Tue, 30 May 2017 21:46:17 +0800 Subject: [PATCH] [web] Add tests for js/components/FlowView/Nav.jsx --- .../__tests__/components/FlowView/NavSpec.js | 38 +++++++++++++++++++ .../FlowView/__snapshots__/NavSpec.js.snap | 35 +++++++++++++++++ web/src/js/components/FlowView/Nav.jsx | 3 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 web/src/js/__tests__/components/FlowView/NavSpec.js create mode 100644 web/src/js/__tests__/components/FlowView/__snapshots__/NavSpec.js.snap diff --git a/web/src/js/__tests__/components/FlowView/NavSpec.js b/web/src/js/__tests__/components/FlowView/NavSpec.js new file mode 100644 index 000000000..867e6f2c4 --- /dev/null +++ b/web/src/js/__tests__/components/FlowView/NavSpec.js @@ -0,0 +1,38 @@ +import React from 'react' +import renderer from 'react-test-renderer' +import Nav, { NavAction } from '../../../components/FlowView/Nav' + +describe('Nav Component', () => { + let tabs = ['foo', 'bar'], + onSelectTab = jest.fn(), + nav = renderer.create(