Website for showcasing all features of Tesseract Web.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

32 righe
642 B

  1. import * as React from 'react';
  2. import {
  3. render,
  4. screen,
  5. } from '@testing-library/react';
  6. import '@testing-library/jest-dom';
  7. import {
  8. Badge,
  9. } from '.';
  10. jest.mock('@tesseract-design/web-base-badge');
  11. describe('Badge', () => {
  12. it('should render a badge', () => {
  13. render(
  14. <Badge />
  15. );
  16. const button: HTMLButtonElement = screen.getByTestId('badge');
  17. expect(button).toBeInTheDocument();
  18. });
  19. it('should render a rounded badge', () => {
  20. render(
  21. <Badge
  22. rounded
  23. />
  24. );
  25. const button: HTMLButtonElement = screen.getByTestId('badge');
  26. expect(button).toBeInTheDocument();
  27. });
  28. });