monounity / karma-typescript

Simplifying running unit tests with coverage for Typescript projects.
313 stars 110 forks source link

Can't find sockjs-client/dist/sockjs #624

Open scottwalter-nice opened 5 months ago

scottwalter-nice commented 5 months ago

Hi,

I'm trying to import a specific commonjs build artifact:

import SockJS from 'sockjs-client/dist/sockjs';

It works great in the library I built. However, when running unit tests I can't get passed this error:

An error was thrown in afterAll Uncaught Error: Can't find sockjs-client/dist/sockjs [undefined] (required by /Volumes/T16-Skyhopper/cxone/libs/cxone-client-platform-services/src/lib/notification/notification.service.ts) Error: Can't find sockjs-client/dist/sockjs [undefined] (required by /Volumes/T16-Skyhopper/cxone/libs/cxone-client-platform-services/src/lib/notification/notification.service.ts)