jsapi-resources icon indicating copy to clipboard operation
jsapi-resources copied to clipboard

can't run tests - component-samples/coding-components/samples/angular

Open todaszy opened this issue 8 months ago • 1 comments

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

todaszy avatar Apr 17 '25 11:04 todaszy

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.

manugadde avatar Apr 17 '25 21:04 manugadde