From 29d695bb49e982ea666e0c65ee2c25933067cd7b Mon Sep 17 00:00:00 2001 From: Jonathan Zobro Date: Sun, 1 Oct 2017 23:55:56 +0700 Subject: [PATCH] test LoadingBolt component --- test/components/CurrencyIcon.spec.js | 2 +- test/components/LoadingBolt.spec.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 test/components/LoadingBolt.spec.js diff --git a/test/components/CurrencyIcon.spec.js b/test/components/CurrencyIcon.spec.js index dbee5b51..bf7ee136 100644 --- a/test/components/CurrencyIcon.spec.js +++ b/test/components/CurrencyIcon.spec.js @@ -14,7 +14,7 @@ describe('component.CurrencyIcon', () => { describe('currency is "usd"', () => { const props = { ...defaultProps, currency: 'usd' } const el = shallow() - it('should show usd symbo', () => { + it('should show usd symbol', () => { expect(el.find(FaDollar)).toHaveLength(1) }) }) diff --git a/test/components/LoadingBolt.spec.js b/test/components/LoadingBolt.spec.js new file mode 100644 index 00000000..e60cd5f4 --- /dev/null +++ b/test/components/LoadingBolt.spec.js @@ -0,0 +1,12 @@ +import React from 'react' +import { shallow } from 'enzyme' +import Isvg from 'react-inlinesvg' +import LoadingBolt from '../../app/components/LoadingBolt' + +describe('component.LoadingBolt', () => { + const el = shallow() + it('should show defaults', () => { + expect(el.find(Isvg).props().src).toContain('cloudbolt.svg') + expect(el.text()).toContain('loading') + }) +})