can't run tests - component-samples/coding-components/samples/angular
IMPORTANT
- [x] My question is related to the samples and content within this repository. For all other issues, open a ticket with Esri Technical Support or post your question in the community forum.
- [x] I have checked for existing issues to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction and comment as necessary to the existing issue instead of creating a new one. You can also refer to this repo's troubleshooting guide for hints and suggestions.
Actual behavior
Can't run tests. Getting error.
Expected behavior
Tests do run.
Reproduction sample
https://github.com/Esri/jsapi-resources/blob/main/component-samples/coding-components/samples/angular/package.json#L10
Reproduction steps
history
Id Duration CommandLine
1 1:20.648 npm i 2 1:33.345 npm run build 3 17.621 npm run test
~\Downloads\jsapi-resources-main\jsapi-resources-main\component-samples\coding-components\samples\angular
> npm run test
> [email protected] test
> ng test
An unhandled exception occurred: error TS500: Error: ENOENT: no such file or directory, lstat 'C:\Users\USER\Downloads\jsapi-resources-main\jsapi-resources-main\component-samples\coding-components\samples\angular\tsconfig.spec.json'
at Object.lstatSync (node:fs:1716:25)
at NodeJSFileSystem.lstat (file:///C:/Users/USER/Downloads/jsapi-resources-main/jsapi-resources-main/component-samples/coding-components/samples/angular/node_modules/@angular/compiler-cli/bundles/chunk-STORTTKY.js:343:16)
at calcProjectFileAndBasePath (file:///C:/Users/USER/Downloads/jsapi-resources-main/jsapi-resources-main/component-samples/coding-components/samples/angular/node_modules/@angular/compiler-cli/bundles/chunk-DOIZMHHW.js:4882:29)
at readConfiguration (file:///C:/Users/USER/Downloads/jsapi-resources-main/jsapi-resources-main/component-samples/coding-components/samples/angular/node_modules/@angular/compiler-cli/bundles/chunk-DOIZMHHW.js:4910:39)
at readTsconfig (C:\Users\USER\Downloads\jsapi-resources-main\jsapi-resources-main\component-samples\coding-components\samples\angular\node_modules\@angular-devkit\build-angular\src\utils\read-tsconfig.js:59:26)
at async generateWebpackConfig (C:\Users\USER\Downloads\jsapi-resources-main\jsapi-resources-main\component-samples\coding-components\samples\angular\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:61:22)
at async generateBrowserWebpackConfigFromContext (C:\Users\USER\Downloads\jsapi-resources-main\jsapi-resources-main\component-samples\coding-components\samples\angular\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:129:20)
at async initializeBrowser (C:\Users\USER\Downloads\jsapi-resources-main\jsapi-resources-main\component-samples\coding-components\samples\angular\node_modules\@angular-devkit\build-angular\src\builders\karma\browser_builder.js:109:24)
See "C:\Users\USER\AppData\Local\Temp\ng-HzGQTY\angular-errors.log" for further details.
Reproduction browser
Node.js v22.14.0
Operating System (check https://whatsmyos.com)
Windows 10* 64-bit
Thank you for reporting this. The test command was not supposed to be there, and we'll go ahead and remove it. This sample is meant to demonstrate how to use the JS SDK with components in Angular, but we don’t include or support framework-specific testing setups.
If you have a question related to the SDK itself and can provide a working repro, we’re happy to help. For Jasmine or Angular testing questions, we recommend reaching out to those respective communities.