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 :
Add and expose a MonacoEditorTestingModule that will provide a "fake" editor that doesn't rely on the actual monaco (like angular's HttpClientTestingModule (I personally prefer this solution)
Wrap the loading logic inside the editor component to prevent the "Monaco is not available" (https://github.com/ng-util/ng-util successfully did it)
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 :MonacoEditorTestingModule
that will provide a "fake" editor that doesn't rely on the actual monaco (like angular'sHttpClientTestingModule
(I personally prefer this solution)