Skip to content

Commit

Permalink
[splendo#15] Updated App component test
Browse files Browse the repository at this point in the history
  • Loading branch information
corrado4eyes committed Dec 6, 2019
1 parent 8473383 commit 332860a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hearthstone/__tests__/uiComponents/app.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('App', () => {
const dispatchSyncCard = jest.fn()
const cards: Card[] = dummyCardArray
const loading = false;
const component: ShallowWrapper = shallow(<App cardSet={cardSet} cards={cards} dispatchSyncCard={dispatchSyncCard} loading={loading}/>);
const component: ShallowWrapper = shallow(<App cardSet={cardSet} filteredCards={cards} dispatchSyncCard={dispatchSyncCard} loading={loading}/>);
it('renders n elements in an array', () => {
component.setState({cards: cards})
const cardComponent = component.find(CardComponent);
Expand All @@ -35,8 +35,8 @@ describe('App', () => {
const state: RootState = {
...initialState,
}
state.card.cards = dummyCardArray;
state.card.cardSet = cardSet
state.card.filteredCards = dummyCardArray;
state.card.filters['cardSet'] = cardSet
state.card.loading = false
const store = generateMockStore(state)
const component: ReactWrapper = mount(<Provider store={store}><ConnectedApp cardSet={cardSet}/></Provider>);
Expand All @@ -47,7 +47,7 @@ describe('App', () => {


it('checks the props', () => {
expect(component.find(App).prop('cards')).toBe(dummyCardArray)
expect(component.find(App).prop('filteredCards')).toBe(dummyCardArray)
expect(component.find(App).prop('loading')).toBe(false)
expect(component.find(App).prop('cardSet')).toBe(cardSet)
});
Expand Down

0 comments on commit 332860a

Please sign in to comment.