This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve lint and add test for TagList
- Loading branch information
1 parent
c810a31
commit 5788b59
Showing
6 changed files
with
79 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { shallowWithIntl } from 'terra-enzyme-intl'; | ||
import TagList from '../../src/TagList'; | ||
|
||
describe('TagList Component', () => { | ||
|
||
it('should render tagList with 2 items"', () => { | ||
const wrapper = shallowWithIntl(<TagList ariaLabel="Tag List"> | ||
<div id="tag1">Tag 1</div> | ||
<div id="tag2">Tag 2</div> | ||
</TagList>); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
packages/terra-tag/tests/jest/__snapshots__/TagList.test.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`TagList Component should render tagList with 2 items" 1`] = ` | ||
<TagList | ||
ariaLabel="Tag List" | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en", | ||
"formatDate": [Function], | ||
"formatHTMLMessage": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatPlural": [Function], | ||
"formatRelative": [Function], | ||
"formatTime": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralFormat": [Function], | ||
"getRelativeFormat": [Function], | ||
}, | ||
"locale": "en", | ||
"messages": null, | ||
"now": [Function], | ||
"onError": [Function], | ||
"textComponent": "span", | ||
"timeZone": null, | ||
} | ||
} | ||
isCollapsible={false} | ||
> | ||
<div | ||
id="tag1" | ||
> | ||
Tag 1 | ||
</div> | ||
<div | ||
id="tag2" | ||
> | ||
Tag 2 | ||
</div> | ||
</TagList> | ||
`; |