forked from splendo/HeartstoneAssessment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1903e4
commit c94f949
Showing
1 changed file
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from '../src/App'; | ||
import {shallow, ShallowWrapper} from 'enzyme' | ||
import { dummyCardArray } from './__mocks__/mockObjects'; | ||
import Card from '../src/model/card'; | ||
|
||
|
||
describe('App', () => { | ||
it(('renders n elements in an array')) | ||
const cards: Card[] = dummyCardArray | ||
it('renders n elements in an array', () => { | ||
const component: ShallowWrapper = shallow(<App/>); | ||
component.setState({cards: cards}) | ||
const divs: ShallowWrapper = component.find('.card'); | ||
expect(divs).toHaveLength(cards.length); | ||
}); | ||
|
||
it('Snapshot testing', () => { | ||
const component: ShallowWrapper = shallow(<App/>); | ||
component.setState({cards: cards}) | ||
expect(component).toMatchSnapshot(); | ||
}); | ||
}); |