allenhwkim / ngentest

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

Error generating for require-from-string #46

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi again,

Of new, I have a problem, in this time, I throw for generate the path folder and it throw this exception: image

What it's the problems?

Thanks for all.

allenhwkim commented 3 years ago

plz paste your code here. import\import.component.ts

ngentest does not work with Windows? I have never tested this under Windows env. I need help with Windows.

ghost commented 3 years ago

This it's my component, it's not unique, I think failed all the component:

REMOVED to protect copy-right by Allen Kim

ghost commented 3 years ago

Sorry, Yes, I execute with Window.

allenhwkim commented 3 years ago

Can you make the example simpler, which focus on faillure also not exposing your company asset?

ghost commented 3 years ago

i'm talking with a coworker for test another application, I will write in this post with my conclusion. If it's necessary, you would close this issues.

ghost commented 3 years ago

Hi again, I know which the problem, when I have a component extends to astract, it failed: image

Do you review?, your app its a great tool.

allenhwkim commented 3 years ago

For this case, the generator try to find ViewAbstractComponent, which is not related generating test code at all. To avoid failure, You can replace this string to blank('') for test generation using replacements at README.md

replacements: [
  { from: 'extends ViewAbstractComponent', to: ''}`
]