Initial commit for Greenlens

This commit is contained in:
Timo Knuth
2026-03-16 21:31:46 +01:00
parent 307135671f
commit 05d4f6e78b
573 changed files with 54233 additions and 1891 deletions

View File

@@ -0,0 +1,19 @@
import React from 'react';
import { render } from '@testing-library/react-native';
import { Toast } from '../../components/Toast';
describe('Toast', () => {
it('renders message when visible', () => {
const { getByText } = render(
<Toast message="Plant saved!" isVisible={true} onClose={jest.fn()} />
);
expect(getByText('Plant saved!')).toBeTruthy();
});
it('does not render when not visible', () => {
const { queryByText } = render(
<Toast message="Plant saved!" isVisible={false} onClose={jest.fn()} />
);
expect(queryByText('Plant saved!')).toBeNull();
});
});