Browse Source

test: delete icon.svg (#37499)

pull/37504/head
lijianan 2 years ago
committed by GitHub
parent
commit
1bb58174c3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/icon/__tests__/index.test.tsx
  2. 0
      components/icon/__tests__/logo.svg
  3. 0
      tests/__snapshots__/index.test.ts.snap
  4. 10
      tests/index.test.ts

2
components/icon/__tests__/index.test.tsx

@ -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);
});

0
components/icon/__tests__/logo.svg

0
tests/__snapshots__/index.test.js.snap → tests/__snapshots__/index.test.ts.snap

10
tests/index.test.js → tests/index.test.ts

@ -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…
Cancel
Save