Closed alfredoperez closed 3 years ago
Hi
This happens when the test generator, which has an isolated environment, tries to compile your code. Which means it can't find your module.
As you seen in README.md, try using replacements. This does not mean replacing your code. It just temporarily replace the code in memory.
replacements: There are some codes, which causes error without proper environment. You need to replace these codes. You can specify from value with regular expression and to value with string. e.g.
replacements: [
{ from: '^\\S+\\.define\\(.*\\);', to: ''}`
]
For example,
// faking import for errorenous lib.
replacements: [
{ from: '@scwx\\/utils-alerts, to: '@angular/core' }
]
I tried to generate a test in a project that uses nrwl and is not able to find modules