Blame view

天文台pc/tianwentai-ui/node_modules/react-day-picker/src/components/IconRight/IconRight.test.tsx 448 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  import { customRender } from 'test/render';
  
  import { IconRight } from './IconRight';
  
  let root: HTMLElement;
  
  beforeEach(() => {
    const view = customRender(
      <IconRight className="foo" style={{ color: 'red' }} />
    );
    root = view.container.firstChild as HTMLElement;
  });
  test('should add the class name', () => {
    expect(root).toHaveClass('foo');
  });
  test('should apply the style', () => {
    expect(root).toHaveStyle({ color: 'red' });
  });