allenhwkim / ngentest

Angular6+ Unit Test Generator For Components, Directive, Services, and Pipes
https://ngentest.github.io
MIT License
144 stars 60 forks source link

ReferenceError: HTMLElement is not defined #59

Closed sathishsms closed 1 year ago

sathishsms commented 1 year ago

While running gentest <.ts>

ReferenceError: HTMLElement is not defined

at /home/mari.satheesh/Documents/git_repos/devops/dashboard/buildboard/angular/eng-dashboard/node_modules/@angular/elements/bundles/elements.umd.js:725:7
at /home/mari.satheesh/Documents/git_repos/devops/dashboard/buildboard/angular/eng-dashboard/node_modules/@angular/elements/bundles/elements.umd.js:8:68
at Object.<anonymous> (/home/mari.satheesh/Documents/git_repos/devops/dashboard/buildboard/angular/eng-dashboard/node_modules/@angular/elements/bundles/elements.umd.js:11:2)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Module.require (node:internal/modules/cjs/loader:1057:19)
at require (node:internal/modules/cjs/helpers:103:18)
allenhwkim commented 1 year ago

This is fixed by 1.5.0 release Remove Angular dependency by parsing code directly instead of using require-from-string https://github.com/allenhwkim/ngentest/pull/63

Please upgrade your command to 1.5.0, npm install ngentest@1.5.0 -D