Trying to use the ArcGIS JS API in a unit test in Jest results in an import error:

Environment:
OS: Windows 10
Node: v20.1.0
Setup: nx repo > library > jest unit test
This issue can be found by simply creating a new NX monorepo/project and creating a TypeScript library and trying to use any ArcGIS JS API class within a Jest spec file (unit test).
Example:
`my-test.spec.ts`
// This import will fail!
import { Point } from '@arcgis/core/geometry';
describe('my test', ()=>{
it('will fail', ()=>{
new Point({ latitude: 42, longitude: -72 });
});
});Â
Steps to Reproduce:
- git clone https://github.com/rustygreen/arcgis-js-api-issue-example.git
- cd arcgis-js-api-issue-example
- npm install
- npm run test -- arcgis-angular
- 🔥 test will fail with import error
Â