mirror of
https://github.com/ant-design/ant-design.git
synced 2025-07-25 07:56:54 +08:00
test: delete icon.svg (#37499)
This commit is contained in:
parent
01ca7c7821
commit
1bb58174c3
@ -4,7 +4,7 @@ import { render } from '../../../tests/utils';
|
||||
|
||||
// v3 兼容性测试
|
||||
describe('Icon', () => {
|
||||
it('should render Icon', () => {
|
||||
it('should not render Icon', () => {
|
||||
const { container } = render(<Icon />);
|
||||
expect(container.firstChild).toBe(null);
|
||||
});
|
||||
|
@ -2,6 +2,8 @@ import pkg from '../package.json';
|
||||
|
||||
const testDist = process.env.LIB_DIR === 'dist';
|
||||
|
||||
type AnyStyleObject = Record<PropertyKey, string | number>;
|
||||
|
||||
describe('antd dist files', () => {
|
||||
// https://github.com/ant-design/ant-design/issues/1638
|
||||
// https://github.com/ant-design/ant-design/issues/1968
|
||||
@ -35,22 +37,22 @@ describe('antd dist files', () => {
|
||||
const { getThemeVariables } = require('../dist/theme');
|
||||
/* eslint-enable global-require,import/no-unresolved */
|
||||
|
||||
const expectThemeWithoutDark = theme => {
|
||||
const expectThemeWithoutDark = (theme: AnyStyleObject) => {
|
||||
expect(theme['blue-3']).toBe("color(~`colorPalette('@{blue-6}', 3) `)");
|
||||
expect(theme['body-background']).toBe('#fff');
|
||||
};
|
||||
|
||||
const expectDarkTheme = theme => {
|
||||
const expectDarkTheme = (theme: AnyStyleObject) => {
|
||||
expect(theme['blue-3']).toBe('mix(@blue-base, @component-background, 30%)');
|
||||
expect(theme['body-background']).toBe('@black');
|
||||
};
|
||||
|
||||
const expectThemeWithoutCompact = theme => {
|
||||
const expectThemeWithoutCompact = (theme: AnyStyleObject) => {
|
||||
expect(theme['padding-lg']).toBe('24px');
|
||||
expect(theme['padding-md']).toBe('16px');
|
||||
};
|
||||
|
||||
const expectCompactTheme = theme => {
|
||||
const expectCompactTheme = (theme: AnyStyleObject) => {
|
||||
expect(theme['padding-lg']).toBe('16px');
|
||||
expect(theme['padding-md']).toBe('8px');
|
||||
};
|
Loading…
Reference in New Issue
Block a user