Skip to content

Commit

Permalink
test(a-button): 更新测试
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Dec 10, 2021
1 parent e39449d commit caed8cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __tests__/BtnLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ describe('BtnLink', () => {
<BtnLink data-testid="foo" href="foo">bar</BtnLink>
</MemoryRouter>);

expect(getByTestId('foo').innerHTML).toBe('bar');
expect(getByTestId('foo')).toMatchSnapshot();
});
});
18 changes: 16 additions & 2 deletions __tests__/__snapshots__/BtnLink.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@
exports[`BtnLink renders correctly 1`] = `
<div>
<a
class="btn btn-primary"
class="ant-btn"
href="/"
>
bar
<span>
bar
</span>
</a>
</div>
`;

exports[`BtnLink text 1`] = `
<a
class="ant-btn"
data-testid="foo"
href="/"
>
<span>
bar
</span>
</a>
`;

0 comments on commit caed8cb

Please sign in to comment.