Skip to content

Commit

Permalink
fix: tests for components
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickleet committed Feb 8, 2019
1 parent 3a81d9e commit 49ff4a2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions __tests__/unit/app/components/Header.jsx
@@ -0,0 +1,12 @@
import React from 'react'
import { shallow } from 'enzyme'
import Header from 'app/components/Header.jsx'

describe('app/components/Header.jsx', () => {
it('renders Header component', () => {
expect(Header).toBeDefined()
const tree = shallow(<Header />)
expect(tree.find('Page')).toBeDefined()
expect(tree.text()).toContain('Stream things!')
})
})
11 changes: 11 additions & 0 deletions __tests__/unit/app/components/Page.jsx
@@ -0,0 +1,11 @@
import React from 'react'
import { shallow } from 'enzyme'
import Page from 'app/components/Page.jsx'

describe('app/components/Page.jsx', () => {
it('renders Page component', () => {
expect(Page).toBeDefined()
const tree = shallow(<Page />)
expect(tree).toBeDefined()
})
})

0 comments on commit 49ff4a2

Please sign in to comment.