mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 21:28:09 +08:00
21 lines
437 B
JavaScript
21 lines
437 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import Anchor from '..';
|
|
|
|
const { Link } = Anchor;
|
|
|
|
describe('Anchor Render', () => {
|
|
it('Anchor render perfectly', () => {
|
|
const wrapper = mount(
|
|
<Anchor>
|
|
<Link href="#API" title="API" />
|
|
</Anchor>
|
|
);
|
|
|
|
wrapper.find('a[href="#API"]').simulate('click');
|
|
|
|
wrapper.node.handleScroll();
|
|
expect(wrapper.node.state).not.toBe(null);
|
|
});
|
|
});
|