test: removed the comment component's enzyme (#37196)

* test: removed the comment component's enzyme

* feat: removed the comment component's enzyme

Co-authored-by: qanglee <545540710@qq.com>
This commit is contained in:
moderate 2022-08-24 15:05:01 +08:00 committed by GitHub
parent 4758d561c5
commit 7dbd6cee27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import { mount } from 'enzyme';
import React from 'react';
import { render } from '../../../tests/utils';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import Comment from '../index';
@ -9,7 +9,7 @@ describe('Comment', () => {
rtlTest(Comment);
it('should support empty actions', () => {
const wrapper = mount(
const wrapper = render(
<Comment
actions={[]}
author={<a>Han Solo</a>}
@ -23,6 +23,6 @@ describe('Comment', () => {
datetime="YYYY-MM-DD HH:mm:ss"
/>,
);
expect(wrapper.render()).toMatchSnapshot();
expect(wrapper.container.firstChild).toMatchSnapshot();
});
});