Anvil/tests/components/atoms/BlockOrReport.test.ts
André Jaenisch fd2ab00cb9
refactor: extract block or report buttons to atom
These have no handlers bound to them yet. At that point the atom might
be refactored to a molecule. Let's see.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-02-11 18:29:53 +01:00

39 lines
761 B
TypeScript

import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/svelte';
import BlockOrReport from '../../../src/lib/components/atoms/BlockOrReport.svelte';
describe('BlockOrReport.svelte', () => {
it('should mount', () => {
// Arrange
// Nothing to prepare
// Act
const { container } = render(BlockOrReport);
// Assert
expect(container).toBeTruthy();
});
it('should allow for block', () => {
// Arrange
// Nothing to prepare
// Act
render(BlockOrReport);
// Assert
expect(screen.getByText('block')).toBeDefined();
});
it('should allow for report', () => {
// Arrange
// Nothing to prepare
// Act
render(BlockOrReport);
// Assert
expect(screen.getByText('report')).toBeDefined();
});
});