Browse Source

test LoadingBolt component

renovate/lint-staged-8.x
Jonathan Zobro 7 years ago
parent
commit
29d695bb49
  1. 2
      test/components/CurrencyIcon.spec.js
  2. 12
      test/components/LoadingBolt.spec.js

2
test/components/CurrencyIcon.spec.js

@ -14,7 +14,7 @@ describe('component.CurrencyIcon', () => {
describe('currency is "usd"', () => {
const props = { ...defaultProps, currency: 'usd' }
const el = shallow(<CurrencyIcon {...props} />)
it('should show usd symbo', () => {
it('should show usd symbol', () => {
expect(el.find(FaDollar)).toHaveLength(1)
})
})

12
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(<LoadingBolt />)
it('should show defaults', () => {
expect(el.find(Isvg).props().src).toContain('cloudbolt.svg')
expect(el.text()).toContain('loading')
})
})
Loading…
Cancel
Save