diff --git a/site/test-coverage.js b/site/test-coverage.js index 53a9eaca0..b5b8ed76c 100644 --- a/site/test-coverage.js +++ b/site/test-coverage.js @@ -20,7 +20,7 @@ module.exports = { dropdownMenu: { statements: '12%', branches: '0%', functions: '0%', lines: '12.85%' }, empty: { statements: '21.42%', branches: '0%', functions: '0%', lines: '21.42%' }, fab: { statements: '5.4%', branches: '0%', functions: '0%', lines: '5.4%' }, - footer: { statements: '40%', branches: '0%', functions: '0%', lines: '40%' }, + footer: { statements: '100%', branches: '100%', functions: '100%', lines: '100%' }, form: { statements: '2.8%', branches: '0%', functions: '0%', lines: '2.96%' }, grid: { statements: '100%', branches: '100%', functions: '100%', lines: '100%' }, guide: { statements: '3.46%', branches: '0%', functions: '0%', lines: '3.77%' }, diff --git a/src/button/__tests__/__snapshots__/button.test.tsx.snap b/src/button/__tests__/__snapshots__/button.test.tsx.snap deleted file mode 100644 index 3b3e84141..000000000 --- a/src/button/__tests__/__snapshots__/button.test.tsx.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Button > content 1`] = ` - - - 按钮组件 - -`; - -exports[`Button 组件测试 > content 1`] = ` - - - 按钮组件 - -`; diff --git a/src/footer/Footer.tsx b/src/footer/Footer.tsx index 1b220c144..cd4fc2983 100644 --- a/src/footer/Footer.tsx +++ b/src/footer/Footer.tsx @@ -11,16 +11,16 @@ export interface FooterProps extends TdFooterProps, StyledProps {} const Footer: React.FC = (originProps) => { const props = useDefaultProps(originProps, footerDefaultProps); - const { links, text, logo } = props; + const { links, text, logo, className, style } = props; const footerClass = usePrefixClass('footer'); const footerLinkClass = usePrefixClass('footer__link'); return ( -
+
{logo && ( - {logo.icon && } + {logo.icon && } {logo.title && {logo.title}} )} diff --git a/src/footer/__tests__/footer.test.tsx b/src/footer/__tests__/footer.test.tsx new file mode 100644 index 000000000..6d793e1d4 --- /dev/null +++ b/src/footer/__tests__/footer.test.tsx @@ -0,0 +1,67 @@ +import { render } from '@test/utils'; +import { describe, test, expect } from 'vitest'; +import React from 'react'; +import Footer from '../Footer'; + +describe('Footer', () => { + describe('props', () => { + test(': text', () => { + const text = 'Hello. TDesign Footer.'; + const { container } = render(