ng2-ckeditor icon indicating copy to clipboard operation
ng2-ckeditor copied to clipboard

Unit Testing with Module

Open thePunderWoman opened this issue 8 years ago • 1 comments

I'm using the current latest Angular CLI (1.0.0-beta.24), and trying to test any code that has ng2-ckeditor in it is proving challenging. Angular 2 switched to webpack, and that's making things interesting. I've included the generic typing for ckeditor as declare var ckeditor: any;, and I've added a reference to ckeditor via the test bootstrap file. However since ckeditor looks for /config.js as well as the theme, it blows up in some instances.

Any test that may interact with the ckeditor instance throws the dreaded 'cannot set property 'dir' of undefined' since I cannot set the config. Any solutions for writing unit tests for components that include this module would be helpful.

thePunderWoman avatar Jan 04 '17 01:01 thePunderWoman

I don't know if its possible, this repo is just a wrapper for CKEditor (which have it's own unit tests chain : http://docs.ckeditor.com/#!/guide/dev_tests)

If someone have a solution, i'll take it !

yabab-dev avatar Jan 09 '17 07:01 yabab-dev