Saltar al contenido
← volver

Our test suite has no DOM: 266 tests in 603 milliseconds, and the two components it checks are rendered to a string

DEV · dev.to Publicado:

PubTrivia is a Next.js app with 201 .tsx files, 52 of which are client components, and a test suite that cannot render a single one of them in a browser-like environment. There is no jsdom, no happy-dom, no Testing Library, and nothing in package.json that would provide one: $ grep -c 'jsdom\|happy-dom\|testing-library' package.json 0 The config is eleven lines: export default defineConfig({ test: { environment: 'node', include: ['**/__tests__/**/*.test.ts'], setupFiles: ['./__tests__/setup.ts'…

Leer original →

Más de DEV