Reputation: 38683
I got this same issue and i resolved it and working perfectly when i run the application.
But same issue am getting right now while run the unit test. am using karma and jasmine tool.
I have tried include quill.js file in karma.config.js fill as well.
files: ['./node_modules/quill/quill.js',
{ pattern: './src/test.ts', watched: true }
],
but still am facing the same issue.
Any idea to resolve this issue?
Upvotes: 2
Views: 3335
Reputation: 465
I added "node_modules/quill/dist/quill.js"
in angular.json file in scripts array
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "src/karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/quill/dist/quill.js"
],
"styles": [
"src/scss/styles.scss"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
}
},
restarted ng test
and the component passed the test
Upvotes: 2
Reputation: 38683
I have resolved this issue by using a flag with *ngIf
<div class="ui-grid-col-6" style="width:114%;" *ngIf="display">
<p-editor [(ngModel)]="printEmailCOC.MailBody" [style]="{'height':'250px'}"></p-editor>
</div>
So Now the p-editor DOM element does not render. And we don't care about the quill package while Unit Testing.
Upvotes: 1