Skip to content

Commit

Permalink
Added some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophNiehoff committed Jun 9, 2023
1 parent 9508928 commit 1eb3dd0
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import PrivacyEnhancedModel from './privacyEnhancedModel';

describe('privacy enhanced model', () => {
it('should provide link to model', () => {
const linkToModel = 'https://link/to/model';

render(<PrivacyEnhancedModel modelRef={linkToModel} />);

screen.getByText(linkToModel);
screen.getByRole('link');
});

it('should not provide link to model if there is no modelRef', () => {
render(<PrivacyEnhancedModel modelRef={undefined} />);

expect(screen.queryByRole('link')).toBeNull();
});
});

0 comments on commit 1eb3dd0

Please sign in to comment.