Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion final/client/src/components/__tests__/button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { render } from '../../enzyme';

import { cleanup } from '../../test-utils';
Expand All @@ -8,6 +9,7 @@ describe('Button', () => {
afterEach(cleanup);

it('should render without error', () => {
render(<Button>Hello World</Button>);
var wrapper = render(<Button>Hello World</Button>);
expect(wrapper.html()).toContain('Hello World');
});
});
3 changes: 2 additions & 1 deletion final/client/src/containers/__tests__/action-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ describe('action button', () => {
afterEach(cleanup);

it('should render without error', () => {
render(<ActionButton/>);
var wrapper = render(<ActionButton/>);
expect(wrapper.find('ActionButton')).not.toBeNull();
});

it('an empty cart should have a button with display message to add to cart', () => {
Expand Down
4 changes: 3 additions & 1 deletion final/client/src/containers/__tests__/logout-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ describe('logout button', () => {
afterEach(cleanup);

it('should renders logout button', async () => {
await mount(
var wrapper = await mount(
<MockedProvider
cache={cache}>
<LogoutButton />
</MockedProvider>);

expect(wrapper.find('LogoutButton')).not.toBeNull();
});

it('on click of logout button, the user should be completely logout', async () => {
Expand Down