Q:

Angular 6: ng test library with IE (Polyfills)

I just migrated an angular library project to angular version 6 (which makes building libraries so much easier). I used ng generate library to create a sub-project in my angular project following this guide. My main project is an app that I can use to see the library in action when developing.
Now I can run tests like ng test my-library. But I would like to test my library with the target environment, which is IE unfortunately. I configured the polyfills and now try to use ng test my-library --browsers=IE, but the polyfills seem to only be respected for the main app - my library will exit the tests quickly with an error that looks polyfills-related (Object does not support fill - roughly translated as my environment is german).
Is there any way to tell angular that I would like to run my library tests "polyfilled"? Thanks!

A:

I was able to solve this quite simply after all - I copied the polyfills.ts file into my subproject-folder and added an import into the library-specific test.ts file (this was automatically created when I generated the library project).
import './polyfills';

