Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-johanson committed Feb 15, 2022
1 parent b67cdc0 commit c1e28a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/LoggedInApp/header/Header.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ describe('Header', () => {
it('renders my account button', () => {
const onLogout = jest.fn();
component.setProps({ loading: false, onLogout, user: { name: 'name' } });
expect(component.find(Link).at(0).prop('to')).toBe('/account');
expect(component.find(Link).at(0).children().at(0).getElement(0)).toEqual(
<FormattedMessage id="header.my.account" />,
);
expect(component.find(Link).at(0)).toMatchSnapshot();
});

it('renders the language switcher', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Header renders my account button 1`] = `
<Link
className="btn btn-link p-0 border-0"
to="/account"
>
<MemoizedFormattedMessage
id="header.my.account"
/>
</Link>
`;

0 comments on commit c1e28a7

Please sign in to comment.