monounity / karma-typescript

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

Avoid adding __esModule and default properties for JSON files loaded with require #577

Open igor-vyatkin-certara opened 1 year ago

igor-vyatkin-certara commented 1 year ago

In our testes we actively use statements like require('./specs/my-data.json') to load test data. But karma-typescript treats all files loaded via require as modules and adds to all of them __esModule and default properties.

Is it possible to avoid adding __esModule and default properties for some files?