-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(tabs): increase coverage (#17565)
- Loading branch information
1 parent
7073e7a
commit fc45491
Showing
3 changed files
with
258 additions
and
2 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
22 changes: 22 additions & 0 deletions
22
packages/react/src/components/Tabs/__tests__/Tabs.Skeleton-test.js
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,22 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { TabsSkeleton } from '../Tabs.Skeleton'; | ||
import { render } from '@testing-library/react'; | ||
|
||
describe('TabsSkeleton', () => { | ||
it('should support a custom `className` prop on the outermost element', () => { | ||
const { container } = render(<TabsSkeleton className="test" />); | ||
expect(container.firstChild).toHaveClass('test'); | ||
}); | ||
|
||
it('should spread additional props on the outermost element', () => { | ||
const { container } = render(<TabsSkeleton data-testid="test" />); | ||
expect(container.firstChild).toHaveAttribute('data-testid', 'test'); | ||
}); | ||
}); |
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