angularjs test change in 3rd party directive

Viewed 54

I'm using karma and jasmine. I have a component that's basically a wrapper for angular-summernote.

I have ng-change on the template url:

`<summernote ng-change="$ctrl.onSummernoteChange()"
        ng-model-options="$ctrl.chModelOptions" name="$ctrl.name"
        ng-model="$ctrl.chModel" config="$ctrl.options"
      ></summernote>`

how do I test that? I'm new to angularjs testing. Is there a way to mock the summernote directive and trigger the ng-change manually from the test?

I don't see a way to make the change directly in the dom itself (due to the way summernote is structured, using contenteditable)

0 Answers
Related