Skip to content

Commit

Permalink
Added simple cases for JSX components to increase the coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
predatorray committed Dec 14, 2024
1 parent 436a612 commit fa6e9ad
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/ActionButton.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import ActionButton from "./ActionButton";

test('rendering does not crash', () => {
render(<ActionButton>Text</ActionButton>);
});
7 changes: 7 additions & 0 deletions src/components/Avatar.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import Avatar from "./Avatar";

test('rendering does not crash', () => {
render(<Avatar />);
});
7 changes: 7 additions & 0 deletions src/components/CardImage.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import CardImage from "./CardImage";

test('rendering does not crash', () => {
render(<CardImage/>);
});
7 changes: 7 additions & 0 deletions src/components/ChipImage.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import ChipImage from "./ChipImage";

test('rendering does not crash', () => {
render(<ChipImage/>);
});
7 changes: 7 additions & 0 deletions src/components/GithubProjectLink.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import GithubProjectLink from "./GithubProjectLink";

test('rendering does not crash', () => {
render(<GithubProjectLink/>);
});
12 changes: 12 additions & 0 deletions src/components/MessageBar.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import { render } from '@testing-library/react';
import MessageBar from "./MessageBar";

test('rendering does not crash', () => {
render(<MessageBar
playerId="player"
eventLogs={[]}
messages={[]}
names={new Map<string, string>()}
/>);
});
7 changes: 7 additions & 0 deletions src/components/Modal.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import Modal from "./Modal";

test('rendering does not crash', () => {
render(<Modal/>);
});
7 changes: 7 additions & 0 deletions src/components/PlayerAvatar.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import PlayerAvatar from "./PlayerAvatar";

test('rendering does not crash', () => {
render(<PlayerAvatar playerId="player"/>);
});
11 changes: 11 additions & 0 deletions src/components/ScoreBoardAndToggle.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { render } from '@testing-library/react';
import ScoreBoardAndToggle from "./ScoreBoardAndToggle";

test('rendering does not crash', () => {
render(<ScoreBoardAndToggle
scoreBoard={new Map()}
totalDebt={new Map()}
bankrolls={new Map()}
names={new Map()}/>);
});

0 comments on commit fa6e9ad

Please sign in to comment.