Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

240
Vistas
How to write unit test with Jest, Fastdom and Preact

I am working on a project that uses fastdom, typescript and preact, and @testing-library/preact. But when I try to write a test, it complains that fastdom is undefined.

My question is how does the fastdom and the preact testing library work? I suppose it runs only that component I render, but it doesn't seem to the case.

here is my code

// SearchResult.test.tsx
import SearchResult from '##/components/SearchResult';

describe('Search Result', () => {
  it('should start with a blank screen', () => {
    render(<SearchResult isLoading={false} />);
    expect(screen.children.length).toEqual(0);
  });
});

Error Message: enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda