-
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.
Merge branch 'main' into chore/wc-deprecate-side-panel-tearsheet
- Loading branch information
Showing
4 changed files
with
99 additions
and
7 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
2 changes: 1 addition & 1 deletion
2
.../components/Pagination/Pagination-test.js → ...s/Pagination/__tests__/Pagination-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
26 changes: 26 additions & 0 deletions
26
packages/react/src/components/Pagination/__tests__/PaginationSkeleton-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,26 @@ | ||
/** | ||
* Copyright IBM Corp. 2016, 2024 | ||
* | ||
* 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 { PaginationSkeleton } from '../Pagination.Skeleton'; | ||
import { render } from '@testing-library/react'; | ||
|
||
describe('PaginationSkeleton', () => { | ||
it('should support a custom `className` prop on the outermost element', () => { | ||
const { container } = render( | ||
<PaginationSkeleton aria-label="test" className="test" /> | ||
); | ||
expect(container.firstChild).toHaveClass('test'); | ||
}); | ||
|
||
it('should spread additional props on the outermost element', () => { | ||
const { container } = render( | ||
<PaginationSkeleton aria-label="test" 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