Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
lint fixes, remove redundant snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
SP1556422 authored and SP1556422 committed Apr 10, 2024
1 parent 9ebce0b commit cbcfa8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';

import ThemeContextProvider from 'terra-theme-context/lib/ThemeContextProvider';
import { BrowserRouter } from 'react-router-dom';
import ApplicationTabs from '../../src/tabs/ApplicationTabs';
import testLinkConfig from './testLinkConfig';
import testLinksWithIconsConfig from './testLinksWithIconsConfig';
import { BrowserRouter } from 'react-router-dom';

// Snapshot tests
it('should render ApplicationTabs with links and alignment', () => {
Expand All @@ -17,7 +17,7 @@ it('should trigger onTabClick handler', () => {
const wrapper = enzymeIntl.mountWithIntl(
<BrowserRouter>
<ApplicationTabs links={testLinkConfig} alignment="start" onTabClick={onTabClickHandler} />
</BrowserRouter>
</BrowserRouter>,
);

wrapper.find('.tab').first().simulate('click');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,40 +175,3 @@ exports[`should render ApplicationTabs with links and alignment 1`] = `
/>
</div>
`;

exports[`should render ApplicationTabs with links and alignment and onTabClick handler 1`] = `
<div>
<withRouter(ApplicationTabs)
alignment="start"
links={
Array [
Object {
"path": "/test1",
"text": "test 1",
},
Object {
"path": "/test2",
"text": "test 2",
},
Object {
"path": "/test3",
"text": "test 3",
},
Object {
"path": "/test4",
"text": "test 4",
},
Object {
"path": "/test5",
"text": "test 5",
},
Object {
"path": "/test6",
"text": "test 6",
},
]
}
onTabClick={[Function]}
/>
</div>
`;
12 changes: 6 additions & 6 deletions packages/terra-application-links/tests/jest/testLinkConfig.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const testLinkConfig = [
{ id: 'link1', path: '/test1', text: 'test 1', icon: jest.fn() },
{ id: 'link2', path: '/test2', text: 'test 2', icon: jest.fn() },
{ id: 'link3', path: '/test3', text: 'test 3', icon: jest.fn() },
{ id: 'link4', path: '/test4', text: 'test 4', icon: jest.fn() },
{ id: 'link5', path: '/test5', text: 'test 5', icon: jest.fn() },
{ id: 'link6', path: '/test6', text: 'test 6', icon: jest.fn() },
{ path: '/test1', text: 'test 1' },
{ path: '/test2', text: 'test 2' },
{ path: '/test3', text: 'test 3' },
{ path: '/test4', text: 'test 4' },
{ path: '/test5', text: 'test 5' },
{ path: '/test6', text: 'test 6' },
];

export default testLinkConfig;

0 comments on commit cbcfa8b

Please sign in to comment.