Skip to content

Commit 8b10703

Browse files
committed
test: 修复单测
1 parent 2a411ca commit 8b10703

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/packages/skeleton/__test__/skeleton.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test('should allow to disable animation', () => {
1111

1212
test('should set duration', () => {
1313
const { container } = render(<Skeleton rows={1} duration={2} />)
14-
const animation = container.querySelector('.nut-skeleton-animation')
14+
const animation = container.querySelector('.nut-skeleton-animated')
1515
expect(animation).toHaveStyle({
1616
animationDuration: '2s',
1717
})

src/packages/skeleton/skeleton.taro.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const Skeleton: FunctionComponent<Partial<TaroSkeletonProps>> = (
9595
>
9696
{animated && (
9797
<View
98-
className={`${animate ? `${classPrefix}-animation` : ''}`}
98+
className={`${classPrefix}-animated ${animate ? `${classPrefix}-animation` : ''}`}
9999
style={durationStyle()}
100100
/>
101101
)}

src/packages/skeleton/skeleton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const Skeleton: FunctionComponent<Partial<WebSkeletonProps>> = (
9494
>
9595
{animated && (
9696
<div
97-
className={`${animate ? `${classPrefix}-animation` : ''}`}
97+
className={`${classPrefix}-animated ${animate ? `${classPrefix}-animation` : ''}`}
9898
style={durationStyle()}
9999
/>
100100
)}

0 commit comments

Comments
 (0)