Skip to content

Commit 784095a

Browse files
committed
action.test passing
1 parent 6acc760 commit 784095a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/app/__tests__/action.test.jsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,18 @@ describe('unit testing for Action.jsx', () => {
1111
let wrapper;
1212
const props = {
1313
selected: true,
14-
sliderIndex: 1,
15-
index: 1,
14+
last: false,
15+
index: 2,
16+
sliderIndex: 2,
1617
dispatch: jest.fn(),
18+
displayName: '3.0',
19+
componentName: 'App',
20+
componentData: {
21+
actualDuration: 3.5,
22+
},
23+
state: { test: 'test' },
24+
viewIndex: 2,
25+
handleOnkeyDown: jest.fn(),
1726
};
1827
beforeEach(() => {
1928
wrapper = shallow(<Action {...props} />);
@@ -32,7 +41,7 @@ describe('unit testing for Action.jsx', () => {
3241
});
3342

3443
test('should have a text that is equal to props.index', () => {
35-
expect(wrapper.find('.action-component-text').text()).toEqual(props.index.toString());
44+
expect(wrapper.find('.action-component-text').text()).toEqual(`${props.displayName}: ${props.componentName} `);
3645
});
3746

3847
test('should invoke dispatch method when clicked', () => {

0 commit comments

Comments
 (0)