mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 15:39:45 +08:00
parent
bd1334065d
commit
f36f1625f1
17
tests/anchor/Anchor.test.js
Normal file
17
tests/anchor/Anchor.test.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { mount } from 'enzyme';
|
||||||
|
import Anchor from '../../components/anchor';
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user