Skip to content

Commit

Permalink
[splendo#1] Renamed file
Browse files Browse the repository at this point in the history
  • Loading branch information
corrado4eyes committed Dec 3, 2019
1 parent c94f949 commit 117656e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions hearthstone/__tests__/app.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import App from '../src/App';
import {shallow, ShallowWrapper} from 'enzyme'
import { dummyCardArray } from './__mocks__/mockObjects';
import Card from '../src/model/card';


describe('App', () => {
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();
});
});

0 comments on commit 117656e

Please sign in to comment.