materiahq / ngx-monaco-editor

Monaco Editor Library for Angular v6 and above
MIT License
159 stars 35 forks source link

Provide APIs for testing #103

Open MikaStark opened 2 years ago

MikaStark commented 2 years ago

Hi, First of all, thanks for your work. I want to point the fact that ngx-monaco-editor is fantastic but lack of feature in order to use it in a test suite. The worst part is the fact that monaco is loaded asynchronously and importing MonacoEditorModule in TestBed bring a "monaco is not available" message. One solution is to wait to monaco to be loaded (with the proper service and observable) but for unknown reason it break some async feature like Angular Material test harnesses and some change detections (may be cause of ngZone#runOutsideAngular lack ?)... Anyway I think you should consider one of these solutions :