Skip to content

Commit

Permalink
✅ test: 补充测试
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 26, 2021
1 parent ed03341 commit cc18875
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
20 changes: 20 additions & 0 deletions packages/float-label-input/tests/__snapshots__/index.spec.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`FloatLabelInput 1`] = `
<div>
<div>
<input
class="ant-input"
label="test"
type="text"
value=""
/>
<label
class=""
style="margin-left: 8px; margin-top: -26px;"
>
test
</label>
</div>
</div>
`;
10 changes: 5 additions & 5 deletions packages/float-label-input/tests/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// import React from 'react';
// import { render } from '@testing-library/react';
import React from 'react';
import { render } from '@testing-library/react';

// import FloatLabelInput from '@arvinxu/float-label-input';
import FloatLabelInput from '@arvinxu/float-label-input';

test('FloatLabelInput', () => {
// const { asFragment } = render(<FloatLabelInput label={'test'} />);
// expect(asFragment).toMatchSnapshot();
const { container } = render(<FloatLabelInput label={'test'} />);
expect(container).toMatchSnapshot();
});

1 comment on commit cc18875

@vercel
Copy link

@vercel vercel bot commented on cc18875 Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.