Closed nhhockeyplayer closed 2 months ago
Please provide your reproduce scenario with https://github.com/thymikee/jest-preset-angular/tree/main/examples
Sure that also works for me
Sure that also works for me
Okay your all set just run the following after clone
https://github.com/nhhockeyplayer/meanstacknh
- yarn install
- nx build shared-feature-auth
- nx run shared-feature-auth:test
the general issue... imports are a general problem for TEST locally and outside the module.
when none of this should be happening the main build runs and completes fine
lso, I sense somewhere someone is inducing the usage of the package.json "type": "module"
somewhere possibly within the mix and jarring other build tasks and configurations...
looking forward to your feedback
this repo is a good unit test
Thanks
I will close this issue since original context is related to TextEncoder which has been fixed in https://github.com/thymikee/jest-preset-angular/pull/2535
Feel free to create a different issue if you see different stack trace
Version
27.5.1
Steps to reproduce
this occurs to all spec files in codebase that attempt to operate on their local files in their local directory
import { LoginComponent } from './login.component';
so fundamental and cant do it
have to operate the path in tsconfig taking the scenic route thru the tsconfig path and barrel file
import {LoginComponent} from '@meanstacknh/shared-feature-auth'
which may not even be valid I feelExpected behavior
should be able to import right on the immediate operating working directory
this is widespread impact to large codebases and not fun consuming alot of time to re-work
Actual behavior
Additional context
immediate relative imports are safe imports preventing unnecessary parsing searching thru paths and barrel files and take precedence to avoid circular dependencies
and this error is forcing us to do the latter with unknown forecasted ramifications
please prioritize immediate relative imports
Environment