1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-18 13:48:58 +02:00

feat: add basic tests

This commit is contained in:
Thomas Heartman 2024-07-23 09:34:39 +02:00
parent edb41cf37d
commit 9edf7206be
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -0,0 +1,16 @@
import { render } from '@testing-library/react';
import { Collaborators } from './Collaborators';
test('renders nothing if collaborators is undefined', () => {
const { container } = render(<Collaborators collaborators={undefined} />);
expect(container).toBeEmptyDOMElement();
});
test('renders nothing if users is empty', () => {
const { container } = render(
<Collaborators collaborators={{ users: [] }} />,
);
expect(container).toBeEmptyDOMElement();
});