monounity / karma-typescript

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

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

Open igor-vyatkin-certara opened 2 years ago

igor-vyatkin-certara commented 2 years 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?