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

164
Vistas
Karma tests doesn't execute while parsing javascript imports in a typescript file

I have been building a typescript based app which uses a few reusable web components written in javascript.

Something like this:

test.ts

import { jsModule } from 'components/module.js';
...

So, now while writing unit tests, karma-typescript doesn't understand the javascript imports and throw me this error without executing the tests.

ERROR [transformer.karma-typescript]: components/module.js: Unexpected token (44:35)
Transform function:
...

What could be an elegant way to write tests for a typescript file having javascript imports, does anyone know what should karma config hold to execute tests in a scenario like this?

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