Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfacq committed May 30, 2024
1 parent 86bd0b8 commit 26f8999
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.

This file was deleted.

3 changes: 2 additions & 1 deletion src/components/AdoptiumNews/__tests__/adptiumNews.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AdoptiumNews from '..';
describe('AdoptiumNews component', () => {
it('renders correctly', () => {
const { container } = render(<AdoptiumNews />);
expect(container).toMatchSnapshot();
// expect container to either be null or contain a div with the class of alert
expect(container).toBeNull || expect(container.querySelector('div.text-pink')).toBeTruthy();
});
});
4 changes: 2 additions & 2 deletions src/components/AdoptiumNews/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import LinkText from '../LinkText'
const AdoptiumNews = () => {

const adoptiumNews = {
title: "Be a part of the first-ever Adoptium Summit on September, 10",
body: "Connect with peers to exchange knowledge on Temurin, AQAvit and other Adoptium's projects. <link>Register here</link>",
title: "Adoptium Summit 2024",
body: "Be a part of the first-ever Adoptium Summit on September, 10<br/>Connect with peers to exchange knowledge on Temurin, AQAvit and other Adoptium's projects. <link>Register here</link>",
link: 'https://www.eclipse.org/events/2024/adoptium-summit/',
// NOTE: Dates below are with the format: "YYYY-MM-dd"
date: new Date('2024-05-30'),
Expand Down

0 comments on commit 26f8999

Please sign in to comment.