Skip to content

Commit

Permalink
test: refactor Tag component tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adaex committed Feb 28, 2024
1 parent 85fd51a commit ce9731d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/arcodesign/components/tag/__test__/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import '@testing-library/jest-dom';
import demoTest from '../../../tests/demoTest';
import mountTest from '../../../tests/mountTest';
import { defaultContext } from '../../context-provider';
Expand All @@ -15,11 +17,6 @@ describe('Tag', () => {
mountTest(() => <Tag type="hollow">Tag</Tag>, 'should mount correctly when set type prop');
mountTest(() => <Tag size="small">Tag</Tag>, 'should mount correctly when set size prop');

import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import Tag from '../Tag'; // 请自行修改路径

it('should callback correctly when close icon be clicked', () => {
const mockFn = jest.fn();
const { container } = render(
Expand Down

0 comments on commit ce9731d

Please sign in to comment.